Closed Bug 114286 Opened 22 years ago Closed 22 years ago
No way to determine if a http request was a 304 or not
There is no way to figure out if a http request got a 304 response, because in nsHttpChannel::ProcessNotModified(), it deletes mResponseHead (which had 304 set on it) and replaces it with mCachedResponseHead which has 200 set. It then proceeds to set mCachedContentIsValid, which is really what I want access to.
exposing mCachedContentIsValid would give you only 304 cases, but any case when the cache is being read. this is probably sufficient for what imglib needs, right?
this patch does two things: 1) adds nsICachingChannel::isFromCache() method to indicate whether or not a channel's data is coming from the cache. 2) makes nsHttpChannel not discard its cache entry when canceled if its cache entry is simply being read.
pavlov: does this do the trick for you? if so, can i get an r=? thx!
Comment on attachment 61526 [details] [diff] [review] v1.0 patch r=pavlov
Attachment #61526 - Flags: review+
Comment on attachment 61526 [details] [diff] [review] v1.0 patch sr=mscott
Attachment #61526 - Flags: superreview+
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.