TS should not send Transfer-Encoding header for responses with an empty body
----------------------------------------------------------------------------

                 Key: TS-189
                 URL: https://issues.apache.org/jira/browse/TS-189
             Project: Traffic Server
          Issue Type: Bug
          Components: Core
            Reporter: Steve Jiang
            Assignee: Steve Jiang
            Priority: Minor
             Fix For: 2.0.0a


In the following scenario with an If-Modified-Since (IMS)/If-None-Match request 
from the client:

client IMS request -> | TS 
        TS IMS request -> | origin
        TS  | <- origin 200 response 
client | <- TS 304 response

When the origin's response to TS is chunked, TS sends a "Transfer-Encoding: 
chunked" header with the 304 response to the client without any body or 0 
chunk.  This, from my reading of the RFC appears to be valid ("The 304 response 
MUST NOT contain a message-body, and thus is always terminated by the first 
empty line after the header fields.").

However, curl (7.16.3) complains and initiates a close when it gets a response 
with Transfer-Encoding: chunked with no body.  To avoid confusion TS should not 
send Transfer-Encoding header for responses with an empty body.


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