Closed
Bug 886903
Opened 12 years ago
Closed 12 years ago
Send correct UserAgent for content process
Categories
(Core Graveyard :: Embedding: GRE Core, defect)
Core Graveyard
Embedding: GRE Core
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla25
People
(Reporter: evilpies, Assigned: evilpies)
References
Details
(Whiteboard: [e10s])
Attachments
(1 file)
5.47 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
We have to send more AppInfo to the content process. (This bug is probably not in the right component)
Attachment #767329 -
Flags: review?(benjamin)
Assignee | ||
Updated•12 years ago
|
Blocks: e10s-necko
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → evilpies
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•12 years ago
|
||
It sends the correct UserAgent header for http request. Without this pages like addons.mozilla.org are broken, because they don't detect Firefox.
Assignee | ||
Updated•12 years ago
|
Whiteboard: [e10s]
Comment 3•12 years ago
|
||
How much are we remoting HTTP? Couldn't we just be building the headers in the parent process instead?
Comment 4•12 years ago
|
||
Comment on attachment 767329 [details] [diff] [review]
v1
Does this bug affect B2G, or is this somehow specific to the new desktop-e10s work?
That said, I don't know how ContentChild::GetSingleton works any more or whether there are cases it can be null which would cause crashes in this code; so I'm going to defer this to somebody who hopefully does know.
Attachment #767329 -
Flags: review?(benjamin) → review?(bent.mozilla)
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #4)
> Comment on attachment 767329 [details] [diff] [review]
> v1
>
> Does this bug affect B2G, or is this somehow specific to the new
> desktop-e10s work?
>
I am not sure, but I am pretty sure somebody would have noticed a bad UserAgent by now.
> That said, I don't know how ContentChild::GetSingleton works any more or
> whether there are cases it can be null which would cause crashes in this
> code; so I'm going to defer this to somebody who hopefully does know.
There are other cases of code that look exactly like mine and just return an other property, so I doubt that this is a problem.
Comment 6•12 years ago
|
||
To be clear, what's the UA before and after this patch?
Assignee | ||
Comment 7•12 years ago
|
||
I am going to try and find out what the difference is. On the first look the UA is the same, but addons.mozilla.org definitely reacts to this change.
Comment 8•12 years ago
|
||
Don't forget to consider HTTP headers and properties of navigator.
Assignee | ||
Comment 9•12 years ago
|
||
You are right the culprit was in Navigator. So what happens is (on amo):
This code https://addons.cdn.mozilla.net/media/js/preload-min.js?build=ecf37e2-51db415f:15 ends up calling NS_GetNavigatorUserAgent, which calls into GetUserAgent of the HTTP handler. There is a small difference between what we return with and without this patch. With it's: "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20130710 Firefox/25.0", without however we are missing Firefox :( "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20130710 /25.0a1".
Comment 10•12 years ago
|
||
Comment on attachment 767329 [details] [diff] [review]
v1
This patch seems fine to me.
Attachment #767329 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 11•12 years ago
|
||
Comment 12•12 years ago
|
||
Something in this push was causing Linux debug mochitest-other to be perma-crashing. I couldn't find you on IRC, so I had to back the entire push out.
https://hg.mozilla.org/integration/mozilla-inbound/rev/998c273658b8
https://tbpl.mozilla.org/php/getParsedLog.php?id=25380532&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=25380601&tree=Mozilla-Inbound
Assignee | ||
Comment 13•12 years ago
|
||
Comment 14•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•