[ 
https://issues.apache.org/jira/browse/COUCHDB-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602341#action_12602341
 ] 

Christopher Lenz commented on COUCHDB-55:
-----------------------------------------

So, as far as I can tell, you get the same behavior without chunked encoding. 
MochiWeb/CouchDB do not read the request body in case an error can be reported 
without even looking into the body, as is the case here for the 404. MochiWeb 
*does* close the connection in this case, so that the unread data does not 
corrupt the next request.

I don't think there's anything wrong here. Does HTTP require that a server 
fully consumes a request body before it can respond, in particular for errors?

> Mochi thinks request is over when it's not. (delayed packets)
> -------------------------------------------------------------
>
>                 Key: COUCHDB-55
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-55
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>         Environment: Ubuntu 8.04
> CouchDB trunk
>            Reporter: Jeff Davey
>            Assignee: Christopher Lenz
>
> When the request is broken up as such:
> Packet #1
> -----------
> PUT /db/doc HTTP/1.1
> Transfer-Encoding:chunked
> Content-Type:application/json
> Host: localhost
> Packet #2
> ------------------
> 1234
> {
>   "ima" : "doc"
> }
> 0
> Mochi ignores the fact that Transfer-Encoding: chunked is set, and gives a 
> 500 error after packet #1 before it receives packet #2.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to