Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4051DDD43 for ; Tue, 18 Dec 2012 11:01:30 +0000 (UTC) Received: (qmail 44968 invoked by uid 500); 18 Dec 2012 11:01:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 43901 invoked by uid 500); 18 Dec 2012 11:01:25 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 43763 invoked by uid 99); 18 Dec 2012 11:01:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 11:01:19 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of N.Breunese@vpro.nl designates 145.58.30.185 as permitted sender) Received: from [145.58.30.185] (HELO out1b.mail.omroep.nl) (145.58.30.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 11:01:11 +0000 Received: from localhost (ou1bclean [10.10.30.159]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id 99999400308 for ; Tue, 18 Dec 2012 12:00:50 +0100 (CET) X-Virus-Scanned: NPO ICT Received: from vergiet.vpro.nl (vergiet.vpro.nl [145.58.168.40]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id 82086400304 for ; Tue, 18 Dec 2012 12:00:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=vpro.nl; i=@vpro.nl; q=dns/txt; s=a; t=1355828450; x=1418900450; h=from:to:date:subject:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=4jDJ5djkj6COYslx+tzG60QN7jkgwIpSCjJ6QnfekZc=; b=d/yn5pPk0wjnLCMHyE61MM+1gSN8VTQsyHF7eu8RSR3e5XWphhGFrFJ+ 9rnd7N9eFm9HQVsLYsYwCPKgAe2rmuijWXT7Zw7Unelt4vccfF9cdEQen 4HarQzkEXX116WgPKN9HAYqYBkGyt5ObS9PHJh3/plAmi/TUN0qh85IrY Y=; X-IronPort-AV: E=Sophos;i="4.84,308,1355094000"; d="scan'208";a="1822784" Received: from mail.vpro.nl ([145.58.171.81]) by vergiet.vpro.nl with ESMTP; 18 Dec 2012 12:00:50 +0100 Received: from VS-EX-01.intra.vpro.nl ([145.58.171.81]) by VS-EX-01.intra.vpro.nl ([145.58.171.81]) with mapi; Tue, 18 Dec 2012 12:00:49 +0100 From: Nils Breunese To: "user@couchdb.apache.org" Date: Tue, 18 Dec 2012 12:00:48 +0100 Subject: Re: Epilogue area in MIME multipart_related docs is not ignored Thread-Topic: Epilogue area in MIME multipart_related docs is not ignored Thread-Index: Ac3dDu/g2x47t7naSJyqK5x8vFR07g== Message-ID: References: In-Reply-To: Accept-Language: nl-NL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: nl-NL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Peter Keller wrote: > 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_par= t_stream() if any bytes are following the final boundary. >=20 > For example, if the last body part ends with >=20 > \r\n=3D=3D1234=3D=3D\r\nabc >=20 > the error reads >=20 > [error] [emulator] Error in process <0.18266.with exit value: {{badmatch,= {<<7 bytes>>, #Fun,ok}},[{couch_doc,'-doc_from= _multi_part_stream/2-fun-1-',3,[{file,"/Users/hs/prj/build-couchdb/dependen= cies/couchdb/src/couchdb/couch_doc.erl"},{line,512}]}]} >=20 > where <<7 bytes>> is 2 + the number of bytes following the two ending hyp= hens (5 in this example). Everything works fine if the last body part ends = with two hyphens only (i.e. the epilogue is left blank). >=20 > However, according to RFC 1521 Sec. 7.2.1 (), "implementations should ignore anything that a= ppears before the first boundary or after the last one". I'd open a bug report: https://issues.apache.org/jira/browse/CouchDB Nils.