Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-189

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0a
    • Core
    • None

    Description

      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.

      Attachments

        1. TS189_sjiang.diff
          0.8 kB
          Steve Jiang

        Activity

          People

            sjiang Steve Jiang
            sjiang Steve Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: