Closed
Bug 1164198
Opened 10 years ago
Closed 10 years ago
Etag is not updated from a 304 response
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
INVALID
People
(Reporter: afmenez, Assigned: mayhemer)
Details
I just implemented Etags on my embedded server, and I believe I found a bug. I am now returning Etags for every cacheable response, but it seems that Firefox is ignoring it for 302 replies. As I understand, the cached resource in the client should be updated with the new cache headers (Etag, LastModified, Cache-Control) returned with the 302 response.
| Reporter | ||
Comment 1•10 years ago
|
||
Sorry, I meant 304 (Not modified) response, not 302.
Summary: Etag is not updated from a 302 response → Etag is not updated from a 304 response
| Assignee | ||
Comment 2•10 years ago
|
||
This appears to me as a valid concern:
https://tools.ietf.org/html/rfc7234#section-4.3.4:
"
If a stored response is selected for update, the cache MUST:
...
use other header fields provided in the 304 (Not Modified)
response to replace all instances of the corresponding header
fields in the stored response.
"
Assignee: nobody → honzab.moz
OS: Windows 7 → All
Hardware: x86_64 → All
| Assignee | ||
Comment 3•10 years ago
|
||
However, we treat ETag as unmodifiable header (since ever:)
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/netwerk/protocol/http/src/nsHttpResponseHead.cpp&rev=1.42.10.1&mark=449#449
But, Last-Modified has been removed from this list (need to find when). ETag should be removed as well IMO, just need to confirm it.
| Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #3)
> But, Last-Modified has been removed from this list (need to find when).
Bug 323708.
| Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Comment 5•10 years ago
|
||
The cache cannot update the strong validator (a.k.a. ETag) from a 304 response by definition:
https://tools.ietf.org/html/rfc7234#section-4.3.4
> o If the new response contains a strong validator (see Section 2.1
> of [RFC7232]), then that strong validator identifies the selected
> representation for update. All of the stored responses with the
> same strong validator are selected. If none of the stored
> responses contain the same strong validator, then the cache MUST
> NOT use the new response to update any stored responses.
This request is something like "SQL does not update a column value if the WHERE clause contains the new column value".
| Assignee | ||
Comment 6•10 years ago
|
||
Thanks :emk.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•