You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Peter Keller (JIRA)" <ji...@apache.org> on 2012/12/19 09:53:14 UTC

[jira] [Updated] (COUCHDB-1632) Epilogue area in MIME multipart_related docs is not ignored

     [ https://issues.apache.org/jira/browse/COUCHDB-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Keller updated COUCHDB-1632:
----------------------------------

    Priority: Minor  (was: Major)
    
> Epilogue area in MIME multipart_related docs is not ignored
> -----------------------------------------------------------
>
>                 Key: COUCHDB-1632
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1632
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>            Reporter: Peter Keller
>            Priority: Minor
>
> When PUTting a document with attachments in MIME multipart/related format, CouchDB (1.2.0 on Mac OS X) throws a badmatch error in doc_from_multi_part_stream() if any bytes are following the final boundary.
> For example, if the last body part ends with
> \r\n==1234==\r\nabc
> the error reads
> [error] [emulator] Error in process <0.18266.with exit value: {{badmatch,{<<7 bytes>>, #Fun<couch_httpd_db.23.117176975>,ok}},[{couch_doc,'-doc_from_multi_part_stream/2-fun-1-',3,[{file,"/Users/hs/prj/build-couchdb/dependencies/couchdb/src/couchdb/couch_doc.erl"},{line,512}]}]}
> where <<7 bytes>> is 2 + the number of bytes following the two ending hyphens (5 in this example). Everything works fine if the last body part ends with two hyphens only (i.e. the epilogue is left blank).
> However, according to RFC 1521 Sec. 7.2.1 (<http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html>), "implementations should ignore anything that appears before the first boundary or after the last one".
> --Peter
> Confirmations:
> On 18.12.201, 18:48 Jens Alfke <je...@couchbase.com>:
> > When PUTting a document with attachments in MIME multipart/related format, CouchDB (1.2.0 on Mac 
> > OS X) throws a badmatch error in doc_from_multi_part_stream() if any bytes are following the final boundary.
> Confirmed; I ran into this as well, while implementing TouchDB, but was too lazy to file a bug report. Don’t repeat my mistake! :)
> Judging by activity on some other bugs I did report, the multipart code is being cleaned up for 1.3, so maybe they can get to this too.
> —Jens

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira