[ 
https://issues.apache.org/jira/browse/TS-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281341#comment-13281341
 ] 

Brian Geffon edited comment on TS-1004 at 5/23/12 1:01 AM:
-----------------------------------------------------------

Hey Otto, I think there is an issue. The situation is as follows:

Origin returns 302 with Transfer-Encoding: Chunked, there is no data, so the 
body is 0\r\n (which is the chunking end).

ATS will then add a Content-Length: 0 header and continue to have the document 
chunked, this will violate the HTTP/1.1 spec since if both are provided 
content-length should be used and then we have a non-zero content-length since 
we're also chunking which means our body is 0\r\n 3 bytes. When I back out this 
patch ATS will then return Content-Length: 0 to the client and will not return 
a chunked response, so I think there might be a weird edge case that's missing 
here. Any ideas on how we can address this?

Could this Content-Length: 0 header be set as a result a TSVIONBytesSet() w/ 0 
bytes?
                
      was (Author: briang):
    Hey Otto, I think there is an issue. The situation is as follows:

Origin returns 302 with Transfer-Encoding: Chunked, there is no data, so the 
body is 0\r\n (which is the chunking end).

ATS will then add a Content-Length: 0 header and continue to have the document 
chunked, this will violate the HTTP/1.1 spec since if both are provided 
content-length should be used and then we have a non-zero content-length since 
we're also chunking which means our body is 0\r\n 3 bytes. When I back out this 
patch ATS will then return Content-Length: 0 to the client and will not return 
a chunked response, so I think there might be a weird edge case that's missing 
here. Any ideas on how we can address this?

                  
> transformation plugins cause connection close when content length is not 
> known ahead
> ------------------------------------------------------------------------------------
>
>                 Key: TS-1004
>                 URL: https://issues.apache.org/jira/browse/TS-1004
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP, Plugins
>    Affects Versions: 3.0.1
>            Reporter: Otto van der Schaaf
>            Assignee: Otto van der Schaaf
>             Fix For: 3.1.1, 3.0.3
>
>         Attachments: chunk_transform_response.diff
>
>
> whenever the null transform plugin (or gzip) is executed, ATS will force the 
> ua connection closed. 
> when the user agent supports it, sending a chunked response w/ keepalive 
> enabled would be preferred i guess
> i'll add a patch for review.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to