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

Turn on caching zero length responses by default

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0
    • HTTP
    • None

    Description

      301 response is not being cached in forward proxy mode if content length is zero bytes.

      Test with a zero byte content length - doing multiple requests:
      [bcall@mac-bryan-wire ~]$ curl -x homer:8080 -D - -o /dev/null -s http://homer.bryancall.com/301.php
      HTTP/1.1 301 Moved Permanently
      Date: Wed, 29 Jan 2014 23:44:03 GMT
      Server: ATS
      X-Powered-By: PHP/5.5.7
      Location: http://www.yahoo.com/
      Content-Length: 0
      Content-Type: text/html; charset=UTF-8
      Age: 0
      Proxy-Connection: keep-alive
      Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/4.2.0 [uScMsSfWpSeN:t cCMi p sS])

      Is cached if the content length is non-zero:
      [bcall@mac-bryan-wire ~]$ curl -x homer:8080 -D - -o /dev/null -s http://homer.bryancall.com/301.php
      HTTP/1.1 301 Moved Permanently
      Date: Wed, 29 Jan 2014 23:48:11 GMT
      Server: ATS
      X-Powered-By: PHP/5.5.7
      Location: http://www.yahoo.com/
      Content-Length: 4
      Content-Type: text/html; charset=UTF-8
      Age: 7
      Proxy-Connection: keep-alive
      Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/4.2.0 [uScHs f p eN:t cCHi p s ])

      Attachments

        Issue Links

          Activity

            People

              zwoop Leif Hedstrom
              bcall Bryan Call
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: