Open jech opened 10 years ago
For example, Polipo generates 110 - "Response is Stale" when the origin server’s response contains an Expires
in the past (which is often done to prevent caching):
$ curl --proxy http://localhost:8123 -siG httpbin.org/response-headers \
> --data-urlencode 'Expires=Sat, 30 Jan 2016 11:55:00 GMT'
HTTP/1.1 200 OK
Content-Length: 116
Date: Sat, 30 Jan 2016 11:55:46 GMT
Expires: Sat, 30 Jan 2016 11:55:00 GMT
Via: 1.1 polipo
Server: nginx
Content-Type: application/json
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Connection: keep-alive
Warning: 110 polipo:8123 Object is stale
{
"Content-Length": "116",
"Content-Type": "application/json",
"Expires": "Sat, 30 Jan 2016 11:55:00 GMT"
}
1xx warn-codes describe the freshness or validation status of the response, and so they MUST be deleted by a cache after validation. They can only be generated by a cache when validating a cached entry, and MUST NOT be generated in any other situation.
The code for generating HTTP Warning headers is dodgy, and probably provides incorrect data in some cases.