Closed Bug 541017 Opened 14 years ago Closed 14 years ago

e10s HTTP: Create common AddHostHeader function

Categories

(Core :: Networking: HTTP, defect)

Other Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jduell.mcbugs, Assigned: lusian)

References

Details

Attachments

(3 files)

Right now we've got some logic in HttpChannelChild::Init to set the Host header (it's currently commented out) that's directly lifted from nsHttpChannel.  We should factor this out into a common function that both HttpChannelChild and nsHttpChannel can call.
Blocks: fennecko
I'll grab this one...  any preferred ways to share the code? Static method? Macro? Util-class? (I guess inheritance is not an option?)
Assignee: nobody → bjarne
Releasing this bug as requested in email.
Assignee: bjarne → nobody
This is a suggested way to do this. Feel free to grab it and modify.
I will continue working based on the suggestion.
Assignee: nobody → lusian
(In reply to comment #4)
> I will continue working based on the suggestion.

You might want to double-check with Jason, Honza or others that this does not break other design-decisions in Electrolysis.
bug 445168 refactors this in a different way, perhaps that's good enough.
Yes Jae, you should really check with the guys driving the e10s-work whether there are any established best-practices or design patterns for such code-sharing (which I suspect will occur frequently). Using static methods may be safer since you don't risk unintentional shared state between the two subclasses. Check with Jason.
Fixed by bug 445168.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Actually this isn't fixed:  we'd still need to call the function biesi created.

But I've decided we should simply share a common Init() class between nsHttpChannel and HttpChannelChild, so that makes this bug moot.

Jae or Bjarne: perhaps one of you could grab Bug 546581?
Resolution: FIXED → WONTFIX
Attached the proposed implementation of the common base-class. Can be used together with the patch as a start for bug #546581
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: