Closed Bug 922659 Opened 12 years ago Closed 12 years ago

HTTP cache v2: exception from onCacheEntryCheck should cause NOT_FOUND

Categories

(Core :: Networking: Cache, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: mayhemer, Assigned: mayhemer)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

Regression from https://hg.mozilla.org/projects/gum/diff/712fb1b90d6b/netwerk/cache2/CacheEntry.cpp 1.64 - nsresult rv = aCallback->OnCacheEntryCheck(this, nullptr, &validityState); 1.65 - LOG((" OnCacheEntryCheck result: rv=0x%08x, validity=%d", rv, validityState)); 1.66 + nsresult rv = aCallback->OnCacheEntryCheck(this, nullptr, &checkResult); 1.67 + LOG((" OnCacheEntryCheck: rv=0x%08x, result=%d", rv, checkResult)); 1.68 1.69 if (NS_FAILED(rv)) 1.70 - validityState = ENTRY_NOT_VALID; 1.71 + checkResult = ENTRY_WANTED; 1.72 } When the onCacheEntryCheck callback throws (what in this case happens since the range request cannot be established) the entry is still passed to onCacheEntryAvailable. Originally, before the change I refer above, the entry was thrown away. So, we need to change ENTRY_WANTED to ENTRY_NOT_WANTED on onCacheEntryCheck failure. This is not critical since the entry won't be used base on !mCacheContentIsValid.
Attached patch v1 (obsolete) — Splinter Review
This needs just a formal review since it's disabled by default.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #812690 - Flags: review?(michal.novotny)
Attached patch v1 [merged]Splinter Review
- remerged
Attachment #812690 - Attachment is obsolete: true
Attachment #812690 - Flags: review?(michal.novotny)
Attachment #827980 - Flags: review?(michal.novotny)
Attachment #827980 - Flags: review?(michal.novotny) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: