You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benoit Chesneau (JIRA)" <ji...@apache.org> on 2009/08/11 23:08:14 UTC
[jira] Created: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
----------------------------------------------------------------------------------------------
Key: COUCHDB-461
URL: https://issues.apache.org/jira/browse/COUCHDB-461
Project: CouchDB
Issue Type: Bug
Reporter: Benoit Chesneau
Fix For: 0.10
Attachments: chunked.diff
This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743047#action_12743047 ]
Paul Joseph Davis commented on COUCHDB-461:
-------------------------------------------
Benoit, can you comment on how CouchDB is currently breaking the HTTP spec so we have a record of it? IIRC, it was something that we would expect chunked transfers by default instead of rejecting them but I'd like to have the reason written down.
Also, I'd suggest that for attachments we don't use chunked transfers because we should never need it. Unless someone can give me a use case that absolutely requires receiving chunked attachments I'd vote to remove them and use a straight up Content-Lenght.
> attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
> ----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-461
> URL: https://issues.apache.org/jira/browse/COUCHDB-461
> Project: CouchDB
> Issue Type: Bug
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: attachments_get_length.diff, attachments_put_length.diff, chunked.diff, chunked2.diff
>
>
> This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Chesneau updated COUCHDB-461:
------------------------------------
Attachment: chunked2.diff
fix indentation in previous patch, sorry.
> attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
> ----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-461
> URL: https://issues.apache.org/jira/browse/COUCHDB-461
> Project: CouchDB
> Issue Type: Bug
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: chunked.diff, chunked2.diff
>
>
> This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742060#action_12742060 ]
Benoit Chesneau commented on COUCHDB-461:
-----------------------------------------
patch has been applied to my github branch :
http://github.com/benoitc/couchdb/commits/chunked
> attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
> ----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-461
> URL: https://issues.apache.org/jira/browse/COUCHDB-461
> Project: CouchDB
> Issue Type: Bug
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: chunked.diff, chunked2.diff
>
>
> This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Anderson resolved COUCHDB-461.
------------------------------------
Resolution: Fixed
closed in r804087 and r804094
thanks for the patch!
> attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
> ----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-461
> URL: https://issues.apache.org/jira/browse/COUCHDB-461
> Project: CouchDB
> Issue Type: Bug
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: attachments_get_length.diff, attachments_put_length.diff, chunked.diff, chunked2.diff
>
>
> This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Chesneau updated COUCHDB-461:
------------------------------------
Attachment: attachments_put_length.diff
attachments_get_length.diff
I splitted previous patch to make it easier. First patch allow couchdb to send attachements (GET) whithout chunked encoding. Content-Length is fixed.
Second patch improve the handling of PUT attachments and follow the standard. If transfert encoding is fixed, couchdb wil first look at it and if chunked use it, If no Transfer-Encoding header, Content-Length is used. With this patch CouchDB now react like current HTTP servers which fix problems with some client that give error 500 on couchdb behind a proxy like Apache server.
> attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
> ----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-461
> URL: https://issues.apache.org/jira/browse/COUCHDB-461
> Project: CouchDB
> Issue Type: Bug
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: attachments_get_length.diff, attachments_put_length.diff, chunked.diff, chunked2.diff
>
>
> This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Chesneau updated COUCHDB-461:
------------------------------------
Attachment: chunked.diff
> attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
> ----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-461
> URL: https://issues.apache.org/jira/browse/COUCHDB-461
> Project: CouchDB
> Issue Type: Bug
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: chunked.diff
>
>
> This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-461) attachments - handle correctly
chunked encoding and Content-Length, send attachments unchunked
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743064#action_12743064 ]
Benoit Chesneau commented on COUCHDB-461:
-----------------------------------------
well according the spec :
"All HTTP/1.1 applications MUST be able to receive and decode the "chunked" transfer-coding, and MUST ignore chunk-extension extensions they do not understand. "
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
Also for the order chunk then content-length, according the spec :
Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding. If the message does include a non- identity transfer-coding, the Content-Length MUST be ignored.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4
I think chunked encoding is still good for some purpose, it allows the client to set buffer dynamically, and ignore bad chunks which could save some bandwidth/time .
> attachments - handle correctly chunked encoding and Content-Length, send attachments unchunked
> ----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-461
> URL: https://issues.apache.org/jira/browse/COUCHDB-461
> Project: CouchDB
> Issue Type: Bug
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: attachments_get_length.diff, attachments_put_length.diff, chunked.diff, chunked2.diff
>
>
> This patch allow couchdb to send attachments unchunked, instead, Content-Length is fixed and content is streamed. It also fix attachments PUT by detecting first if encoding is chunked then test the length witch is the standard way to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.