Closed Bug 1113004 Opened 10 years ago Closed 10 years ago

Add IsPrivateResponse to HttpChannel

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: francois, Assigned: francois)

References

Details

Attachments

(1 file, 1 obsolete file)

nsIHttpChannel already has an isNoStoreResponse method to check for "Cache-control: no-store": http://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannel.idl#289 Honza suggested (https://bugzilla.mozilla.org/show_bug.cgi?id=992096#c24) a new isPrivateResponse method to make it easier to check for publicly cachable resources in the sub-resource integrity code (bug 992096).
Honza, Is that what you had in mind for the nsIHttpChannel.IsPrivateResponse()? I added a very basic test, but if there's a good place to test this properly, please let me know and I'll add it. I've tested it manually as part of my patch for bug 992096.
Assignee: nobody → francois
Status: NEW → ASSIGNED
Attachment #8538286 - Flags: review?(honzab.moz)
Comment on attachment 8538286 [details] [diff] [review] Implementation with a very basic test Review of attachment 8538286 [details] [diff] [review]: ----------------------------------------------------------------- You also need to update netwerk\protocol\http\PHttpChannelParams.h to carry this new member via IPC. ::: netwerk/protocol/http/nsIHttpChannel.idl @@ +305,5 @@ > + * > + * @throws NS_ERROR_NOT_AVAILABLE if called before the response > + * has been received (before onStartRequest). > + */ > + boolean isPrivateResponse(); modify IID !
Attachment #8538286 - Flags: review?(honzab.moz) → feedback+
This new patch fixes the issues highlighted in comment 2 (thanks Honza!). Try run here: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=463b98759baa
Attachment #8538286 - Attachment is obsolete: true
Attachment #8546421 - Flags: review?(honzab.moz)
Attachment #8546421 - Flags: review?(honzab.moz) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: