Closed Bug 1347470 Opened 7 years ago Closed 7 years ago

wrong content length for a 200 which overwrites cache with alt data

Categories

(Core :: Networking: Cache, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: CuveeHsu, Assigned: CuveeHsu)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 1 obsolete file)

Since content length depends on |mAvailableCachedAltDataType| [1], we should clean the status after if we don't pass revalidation and get an update content.

[1] http://searchfox.org/mozilla-central/rev/ca7015fa45b30b29176fbaa70ba0a36fe9263c38/netwerk/protocol/http/HttpBaseChannel.cpp#705
Attached patch cleanAltType (obsolete) — Splinter Review
Attachment #8847519 - Flags: review?(michal.novotny)
I'd prefer to put resetting mAvailableCachedAltDataType to InitCacheEntry(). The other option is to move setting mAvailableCachedAltDataType to OnStartRequest(). Valentin, what's your opinion?
Flags: needinfo?(valentin.gosu)
Attachment #8847519 - Flags: review?(michal.novotny)
(In reply to Michal Novotny (:michal) from comment #2)
> I'd prefer to put resetting mAvailableCachedAltDataType to InitCacheEntry().
> The other option is to move setting mAvailableCachedAltDataType to
> OnStartRequest(). Valentin, what's your opinion?

I agree, InitCacheEntry seems like the better choice.
Flags: needinfo?(valentin.gosu)
Attachment #8847519 - Attachment is obsolete: true
Attachment #8847872 - Flags: review?(valentin.gosu)
Attachment #8847872 - Flags: review?(valentin.gosu) → review+
Bug 1334388 is fixed. I guess the orange will disappear after rebase.
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2fd89162ba8d
clean mAvailableCachedAltDataType when we get 200, r=valentin
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2fd89162ba8d
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.