Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B21B210F76 for ; Tue, 10 Dec 2013 08:27:11 +0000 (UTC) Received: (qmail 11557 invoked by uid 500); 10 Dec 2013 08:27:10 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11486 invoked by uid 500); 10 Dec 2013 08:27:08 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 11478 invoked by uid 99); 10 Dec 2013 08:27:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Dec 2013 08:27:07 +0000 Date: Tue, 10 Dec 2013 08:27:07 +0000 (UTC) From: "Nick North (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (COUCHDB-1956) Make attachment lengths and Content-Length optional for multipart requests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Nick North created COUCHDB-1956: ----------------------------------- Summary: 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.4#6159)