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 256D4DC8C for ; Sun, 16 Dec 2012 09:25:27 +0000 (UTC) Received: (qmail 87746 invoked by uid 500); 16 Dec 2012 09:25:26 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 86391 invoked by uid 500); 16 Dec 2012 09:25:15 -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 86253 invoked by uid 99); 16 Dec 2012 09:25:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Dec 2012 09:25:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of peter.keller@ikeep.com designates 82.195.224.41 as permitted sender) Received: from [82.195.224.41] (HELO mxo41.mail.genotec.ch) (82.195.224.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Dec 2012 09:25:05 +0000 Received: from mxo41.mail.genotec.ch (localhost [127.0.0.1]) by dkgate.mx.genotec.ch (Postfix) with ESMTP id 757FA666C21; Sun, 16 Dec 2012 10:24:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=genotec.ch; h=from :content-type:content-transfer-encoding:date:subject:to :message-id:mime-version; s=dkim; bh=DQzy5Zb3UA9DSpaw+gCX5I5HTvA =; b=ie0eakvOrLs6kS3IuNBqby9pdUx9ODXcFB1F176YyqRv4xgEcZOIfrKbPlG QawKKRq0o7zu/Ar0IVnIMXBrc/5zmdDhMfVJrhbMdgBGk1rY8pKcjFlqYy+PTsfT tX48ju9q+w/zoX5uLxR1x7d6w9EEygaxMMUDfSzNpcGCVGX0= Received: from mxo41.mail.genotec.ch (localhost [127.0.0.1]) by avgate.mx.genotec.ch (Postfix) with ESMTP id 5917C666C1D; Sun, 16 Dec 2012 10:24:43 +0100 (CET) Received: from [192.168.1.5] (gic-bal-bsd-001.genotec.ch [82.195.224.25]) by mxo41.mail.genotec.ch (Postfix) with ESMTPSA id 3903F666C17; Sun, 16 Dec 2012 10:24:43 +0100 (CET) From: Peter Keller Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Sun, 16 Dec 2012 10:24:39 +0100 Subject: Epilogue area in MIME multipart_related docs is not ignored To: user@couchdb.apache.org Message-Id: Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) X-GIC-MailScanner-Outbound: ClamAV using ClamSMTP X-Virus-Checked: Checked by ClamAV on apache.org Hello, 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=3D=3D1234=3D=3D\r\nabc the error reads [error] [emulator] Error in process <0.18266.with exit value: = {{badmatch,{<<7 bytes>>, = #Fun,ok}},[{couch_doc,'-doc_from_multi_part_s= tream/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 = (), = "implementations should ignore anything that appears before the first = boundary or after the last one". Regards, Peter=