couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Chesneau (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-40) Transfer-Encoding: Chunked on HTTP 1.0 request
Date Wed, 30 Apr 2008 07:06:55 GMT

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

Benoit Chesneau commented on COUCHDB-40:
----------------------------------------

Sound goof, did the patch have been tested on all http1/0 proxy ? 

About changes in javascript :

>From the rfc 1945 who define http/1.0 :

   A valid Content-Length is required on all HTTP/1.0 POST requests. An
   HTTP/1.0 server should respond with a 400 (bad request) message if it
   cannot determine the length of the request message's content.


Proxies like nginx are very strict about it. More over nginx don't accept in proxy mode the
POST/PUT request without body like a quick search in google would told you.

About content-length :

   When an Entity-Body is included with a message, the length of that
   body may be determined in one of two ways. If a Content-Length header
   field is present, its value in bytes represents the length of the
   Entity-Body. Otherwise, the body length is determined by the closing
   of the connection by the server.

So indeed there is no need to bufferize the response if you close the connection at the end.

Just better to do it when you can it help the client to optimize the connection. So in the
case you could do it like in send_json why not ?

All this stuff need more tests anyway I already provided some results on ml, did you see them
?

> Transfer-Encoding: Chunked on HTTP 1.0 request
> ----------------------------------------------
>
>                 Key: COUCHDB-40
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-40
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>         Environment: Irrelevant
>            Reporter: Kore Nordmann
>         Attachments: compat_http10_couchdb_r649048.diff, mochiweb_chunking_http10.diff,
mochiweb_chunking_http10_2.diff, patch-share_www_script_jquery_couch_js, patch-src_couchdb_couch_httpd_erl
>
>
> The following request:
> > DELETE /test HTTP/1.0
> > Host: localhost
> is responded like:
> > HTTP/1.0 404 Object Not Found
> > Transfer-Encoding: chunked
> > Server: MochiWeb/1.0 (Any of you quaids got a smint?)
> > Date: Tue, 15 Apr 2008 20:39:07 GMT
> > Content-Type: text/plain;charset=utf-8
> > 
> > 28
> > {"error":"not_found","reason":"missing"}
> > 0
> while chunked transfer-encoding is only supported by HTTP 1.1.

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


Mime
View raw message