Closed
Bug 555514
Opened 15 years ago
Closed 15 years ago
e10s HTTP: propagate SetReferrer to chrome process
Categories
(Core :: Networking: HTTP, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jduell.mcbugs, Assigned: lusian)
References
Details
Attachments
(1 file, 2 obsolete files)
11.07 KB,
patch
|
jduell.mcbugs
:
review+
|
Details | Diff | Splinter Review |
Right now we DROP_DEAD if you try to call SetReferrer. We should instead set the referrer (both mReferrer and the famously misspelt "Referer" header) on both the tab and chrome process.
The easy part of this is to just move nsHttpChannel::SetReferrer into our base class (add a NS_ENSURE_CALLED_BEFORE_ASYNC_OPEN?), then pass mReferrer to SendAsyncOpen. Then we can either 1) just call SetReferrer on the chrome channel with the URI; or 2) do something more efficient. SetReferrer does a lot of fiddling with the URI (stripping off user:pass, etc.) that we will have already done, so ideally we should just set mReferrer directly (by creating a non-IDL public function in nsHttpChannel), and then SetHeader("referer").
We'll want a test, of course (we could add it to test_head.js)
Jae-Seong, you want to take this?
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → lusian
Assignee | ||
Comment 1•15 years ago
|
||
This patch is based on Bug 546581.
I have a question in HttpChannelParent.cpp, where I am trying to call SetReferrerHeader in nsHttpChannel.h.
How do I get nsHttpChannel* inside RecvAsyncOpen?
Reporter | ||
Comment 2•15 years ago
|
||
Use a static_cast--see OnStartRequest for an example. You can cast the nsIChannel you get from NS_NewChannel, or the nsIHttpChannel you QI--any of these can be cast to nsHttpChannel.
Reporter | ||
Comment 3•15 years ago
|
||
Oh, and base your patch off of the patch from bug 546581--that's going to land before this.
Assignee | ||
Comment 4•15 years ago
|
||
Attachment #435872 -
Attachment is obsolete: true
Attachment #436144 -
Flags: review?(jduell.mcbugs)
Reporter | ||
Comment 5•15 years ago
|
||
Comment on attachment 436144 [details] [diff] [review]
patch, 1
Looks great--thanks.
nits:
Let's change the name of SetReferrerHeader() to SetReferrerInternal(). Get rid of the blank line in the function.
Test looks good!
Go ahead and update the patch when you get a chance, and I'll check it in once the base channel patch lands
Attachment #436144 -
Flags: review?(jduell.mcbugs) → review+
Assignee | ||
Comment 6•15 years ago
|
||
Attachment #436144 -
Attachment is obsolete: true
Reporter | ||
Comment 7•15 years ago
|
||
Comment on attachment 436601 [details] [diff] [review]
patch, 2
thanks!
Attachment #436601 -
Flags: review+
Reporter | ||
Comment 8•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•