[ 
https://issues.apache.org/jira/browse/COUCHDB-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13859587#comment-13859587
 ] 

Nick North commented on COUCHDB-1956:
-------------------------------------

Happy New Year to everyone on the list. I finally have some code to improve 
multipart parsing, after becoming much more familiar with the innermost 
intricacies than anticipated. But I haven't yet looked into adding new tests 
with/without attachment length supplied and with/without chunked encoding 
(though these are all tested locally). Is there any advantage in putting the 
code out for review now or should it wait until the test suite is updated? If 
there is any interest in seeing the code, what is the best mechanism for making 
it available when there is more to be added before it's ready to merge in to 
the main repo?

> Make attachment lengths and Content-Length optional for multipart requests
> --------------------------------------------------------------------------
>
>                 Key: COUCHDB-1956
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1956
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>            Reporter: Nick North
>
> This is a placeholder for some of the work I proposed in an earlier email to 
> the dev list.
> If you submit a document and attachments as a MIME multipart/related request, 
> you have to give lengths for each attachment in the initial JSON document and 
> a Content-Length for the HTTP request as a whole. This is inconvenient for 
> HTTP clients which want to stream large attachments into the HTTP request, as 
> they may not know the attachment size in advance. 
> So CouchDb should be able to accept chunked multipart/related requests and 
> attachments' lengths should not have to be specified in the JSON document. 
> These are two distinct pieces of work but closely related, so I've put them 
> in one issue.
> Most of the groundwork is already there in CouchDb. There is support for 
> reading chunked requests, but it's not currently used when parsing 
> multipart/related requests. And attachment lengths are not critical to 
> parsing attachments: the parser knows by other means when it's reached the 
> end of an attachment, and the system internally recalculates their lengths 
> anyway.
> Work on chunked requests is complete, but I'll save the pull request until 
> attachment lengths are also sorted.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to