You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/01/14 01:59:53 UTC
[GitHub] [couchdb] anuragvohraec opened a new issue #2448: How to place a
multipart request, with Content-Types as multipart/related,
the error message needs to be more descriptive ?
anuragvohraec opened a new issue #2448: How to place a multipart request, with Content-Types as multipart/related, the error message needs to be more descriptive ?
URL: https://github.com/apache/couchdb/issues/2448
Hi Team,
I am writing a couchdb implementation in dart language called as "Recliner"!
I was able to start replication between it and Couchdb all fine, except for replicating the attachments.
I was sending the multipart-related request to couch db, but just replies me withsome stack trace of erl. Can this error message be more usefull so that, I can derive want went wrong during multipart -related request.
Here are the details of my requests:
`PUT http://0.0.0.0:5984/test1/1578965820946-0?new_edits=false`
```
--dart-http-boundary-H8RyGWfwBEjeTMBEpoNHBQokSP5Ua9sNTWSLkqVDHGlR-2BAtVI
Content-Type: application/json
{"name":"prod1","_id":"1578965820946-0","_attachments":{"1.json":{"content_type":"application/json","length":163}},"stub":true,"_rev":"2-bdfa5e310511cf0f0fbbe8bb4c759035"}
--dart-http-boundary-H8RyGWfwBEjeTMBEpoNHBQokSP5Ua9sNTWSLkqVDHGlR-2BAtVI
Content-Type: application/json
Content-Disposition: attachment; filename="1.json"
Content-Length: 163
{
"_id": "_design/_db",
"language" : "javascript",
"views": {
"_id": {
"map": "function(doc){emit({_id: doc._id, _rev: doc._rev},{});}"
}
}
}
--dart-http-boundary-H8RyGWfwBEjeTMBEpoNHBQokSP5Ua9sNTWSLkqVDHGlR-2BAtVI--
```
It gives me this error :
```
{
"error" : "error",
"reason" : "{{nocatch,<<\"expected more data\">>},\n [{chttpd_db,receive_request_data,2,[{file,\"src/chttpd_db.erl\"},{line,1107}]},\n {couch_httpd,read_until,3,[{file,\"src/couch_httpd.erl\"},{line,1070}]},\n {couch_httpd,parse_part_header,1,[{file,\"src/couch_httpd.erl\"},{line,1098}]},\n {couch_httpd,parse_multipart_request,3,\n [{file,\"src/couch_httpd.erl\"},{line,1035}]},\n {couch_httpd_multipart,'-decode_multipart_stream/3-fun-1-',4,\n [{file,\"src/couch_httpd_multipart.erl\"},{line,33}]}]}"
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services