Summary: | mod_cache can send a 304 to unconditional req when handling a contradiction on revalidation | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Eric Covener <covener> |
Component: | mod_cache | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.4.10 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Attachments: | loglevel trace8 |
Description
Eric Covener
2014-08-22 14:46:46 UTC
FWIW: In my case the contradiction is intersting too. I am caching a recently created static file that gets a weak etag at startup, then when it expires, httpd generates the same etag but without the W/ prefix. Created attachment 31937 [details]
loglevel trace8
debug + a little added trace of the client that gets a 304 to unconditional request. Before the expiration, the static file got a weak etag, and now it does not have the weak prefix (not traced but clear from logs)
It looks like r->status = HTTP_OK before the internal redirect does the trick. I confirmed the internal redirect could actually return different contents then the state cache thing, and even non-success after this, although I still can't see who short-circuits over r->status != HTTP_OK. |