couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Keller <>
Subject Epilogue area in MIME multipart_related docs is not ignored
Date Sun, 16 Dec 2012 09:24:39 GMT

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


the error reads

[error] [emulator] Error in process <0.18266.with exit value: {{badmatch,{<<7 bytes>>,

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 (<>),
"implementations should ignore anything that appears before the first boundary or after the
last one".

View raw message