couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Git at Apache <...@git.apache.org>
Subject couchdb pull request: Fix list HTTP header handling.
Date Sun, 15 Apr 2012 16:18:51 GMT
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


Mime
View raw message