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
- is related to
-
TS-621 writing 0 bytes to the HTTP cache means only update the header... need a new API: update_header_only() to allow 0 byte files to be cached
- Closed