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 0EBC9919A for ; Sun, 15 Apr 2012 16:18:53 +0000 (UTC) Received: (qmail 7540 invoked by uid 500); 15 Apr 2012 16:18:52 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 7512 invoked by uid 500); 15 Apr 2012 16:18:52 -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 7504 invoked by uid 99); 15 Apr 2012 16:18:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 16:18:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 06DB0D00D; Sun, 15 Apr 2012 16:18:51 +0000 (UTC) From: Git at Apache To: dev@couchdb.apache.org Subject: couchdb pull request: Fix list HTTP header handling. Content-Type: text/plain Message-Id: <20120415161852.06DB0D00D@tyr.zones.apache.org> Date: Sun, 15 Apr 2012 16:18:51 +0000 (UTC) GitHub user calebcase opened the pull request at https://github.com/apache/couchdb/pull/18 ---- Fix list HTTP header handling. Currently calls to getRow() cause the HTTP headers to be sent immediately back to the client. This happens even if an error is thrown after the getRow(), but before any send(...) or start(...). Worse, if a list throws an exception an extra, invalid header is sent to the client (resulting in various bad behavior). Erlang list handling will now wait until data has been sent BEFORE sending the HTTP headers to the client. If an error is reported it will result in an HTTP error code as expected. This does not change the behavior of errors thrown AFTER data has been sent: They will still result in an HTTP 200 even if an error is reported. The line protocol between Erlang and os processes has been extended to support an optional Header field on "chunks" and "end". The javascript list handling has been updated to use this if a new header is set via start(...). This makes it possible to begin processing with getRow(), but later reset the headers via start(...). Again, if data has been sent(...) the new headers will NOT take effect. COUCHDB-430 COUCHDB-514 COUCHDB-764 ---- You can merge this pull request into a Git repository by running $ git pull https://github.com/calebcase/couchdb master Alternatively you can review and apply these changes as the patch at https://github.com/apache/couchdb/pull/18.patch