[ 
https://issues.apache.org/jira/browse/COUCHDB-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Newson updated COUCHDB-433:
----------------------------------

    Attachment: 0001-fix-e-c-handling.patch


Mochiweb expects the Expect headers value to be "100-continue" and hangs if it 
gets, for example, "100-Continue" which is what Apache HttpClient sends.

the patch lower-cases the value of the Expect header before matching to 
"100-continue" thus allowing HttpClient to work against couchdb without the 2 
second delay while it waits for an "HTTP 1.1 100 continue" response that will 
never come.

> CouchDB doesn't handle Expect header.
> -------------------------------------
>
>                 Key: COUCHDB-433
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-433
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 0.10
>            Reporter: Robert Newson
>         Attachments: 0001-fix-e-c-handling.patch
>
>
> An HTTP client may elect to send an "Expect: 100-Continue" header. All 
> compliant HTTP servers are required to;
> "A server that does not understand or is unable to comply with any of the 
> expectation values in the Expect field of a request MUST respond with 
> appropriate error status. The server MUST respond with a 417 (Expectation 
> Failed) status if any of the expectations cannot be met or, if there are 
> other problems with the request, some other 4xx status."
> from http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
> CouchDB sends neither the Continue response (if it supports expect-continue) 
> or 417 (if it doesn't).
> This leads clients that include the header to hang while they timeout 
> expecting either response.
> Suggest returning a 417 response so that compliant clients will retry 
> immediately without the Expect header.

-- 
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