Closed
Bug 263903
Opened 20 years ago
Closed 20 years ago
redirects with a body not cached properly
Categories
(Core :: Networking: HTTP, defect)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
mozilla1.8beta1
People
(Reporter: dbaron, Assigned: darin.moz)
Details
(Whiteboard: [ready to land])
Attachments
(1 file)
4.39 KB,
patch
|
Biesinger
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
We don't seem to cache redirects with a body. If I serve an Apache asis file containing: Status: 301 Moved Permanently Location: http://www.mozilla.org/ Cache-Control: max-age=86400 Content-Type: text/plain http://www.mozilla.org/ and load it twice in the same browser session, I get two hits on the server. The second load, an NSPR log shows: Cached data size does not match the Content-Length header [content-length=24 size=0]
Reporter | ||
Comment 1•20 years ago
|
||
(I was actually seeing this on an aviary branch build, but darin thinks it's on the trunk as well and has been around for a while.)
Reporter | ||
Updated•20 years ago
|
Summary: redirects with a body not cached → redirects with a body not cached properly
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta
Comment 2•20 years ago
|
||
See http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpChannel.cpp#741 (the "don't store the response body for redirects" comment).
Assignee | ||
Comment 3•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #162666 -
Flags: superreview?(bzbarsky)
Attachment #162666 -
Flags: review?(cbiesinger)
Updated•20 years ago
|
Attachment #162666 -
Flags: review?(cbiesinger) → review+
Comment 4•20 years ago
|
||
Comment on attachment 162666 [details] [diff] [review] v1 patch So this just skips doing the content-length comparison and ensuing cache invalidate for cases when we have a redirect? If so, sr=bzbarsky. If I misunderstood something, please tell me what. ;)
Attachment #162666 -
Flags: superreview?(bzbarsky) → superreview+
Assignee | ||
Comment 5•20 years ago
|
||
> So this just skips doing the content-length comparison and ensuing cache
> invalidate for cases when we have a redirect?
>
> If so, sr=bzbarsky. If I misunderstood something, please tell me what. ;)
you are correct. the alternative would have been to strip the Content-Length
header before inserting the headers into the cache, but since i realized that we
also have the same bug for HEAD responses, i figured it was best to put all of
the checking into CheckCache.
Assignee | ||
Updated•20 years ago
|
Whiteboard: [ready to land]
Assignee | ||
Comment 6•20 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•