[
https://issues.apache.org/jira/browse/COUCHDB-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362748#comment-15362748
]
ASF GitHub Bot commented on COUCHDB-1403:
-----------------------------------------
Github user snej commented on the issue:
https://github.com/apache/couchdb/pull/138
Two years later (and four+ years after I filed
[COUCHDB-1403](https://issues.apache.org/jira/browse/COUCHDB-1403) which got
duped to this) and this still hasn't been fixed :-(
This is still causing some compatibility issues with Couchbase Lite, viz.
[this forum
thread](https://forums.couchbase.com/t/attachments-are-not-replicated-to-couchdb-from-couchbase-lite-1-2-0-1-2-1/8990/4)
from a few days ago.
> Multipart upload fails with exception if request body is chunked
> ----------------------------------------------------------------
>
> Key: COUCHDB-1403
> URL: https://issues.apache.org/jira/browse/COUCHDB-1403
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Affects Versions: 1.1.1
> Environment: Mac OS X 10.7.3, Couchbase Single Server 2.0.0dev4
> (based on CouchDB 1.1.1)
> Reporter: Jens Alfke
> Priority: Minor
>
> CouchDB doesn't correctly parse MIME multipart PUT/POST requests when the
> HTTP transfer is chunked. It generates an Erlang exception, and the client
> sees that the socket was closed unexpectedly.
> [error] [emulator] Error in process <0.15079.3> with exit value:
> {badarith,[{couch_httpd_db,'-receive_request_data/2-fun-0-',3},{couch_httpd,read_until,3},{couch_httpd,parse_part_body,1},{couch_httpd,parse_multipart_request,3},{couch_doc,'-doc_from_multi_part_stream/2-fun-1-'...
>
> The source looks like:
> receive_request_data(Req) ->
> receive_request_data(Req, couch_httpd:body_length(Req)).
> receive_request_data(Req, LenLeft) when LenLeft > 0 ->
> Robert Newson commented on the user@ list: "Pretty obvious bug, yes. We're
> attempting to evaluate whether the atom 'chunked' is greater than zero."
> The obvious workaround -- don't use chunked -- may not be available to
> clients. This level of encoding is generally performed by the browser or
> client HTTP library, and the app level code may not have control over whether
> it's performed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)