Closed Bug 800157 Opened 12 years ago Closed 12 years ago

Make User Agent overrides affect navigator.userAgent in addition to the HTTP header

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox17 --- fixed
firefox18 --- fixed

People

(Reporter: dao, Assigned: dao)

References

Details

Attachments

(1 file, 2 obsolete files)

Bug 795348 might need this unless that site can be evangelized. Either way, it will be good to have the ability to override navigator.userAgent up our sleeve. I suppose UserAgentOverrides.jsm needs to converted to an XPCOM service, or an XPCOM services utilizing UserAgentOverrides.jsm needs to be added, such that Navigator.cpp can use that. Does this sound reasonable?
Seems fine to me, yes.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #670305 - Flags: review?(bzbarsky)
Attached patch override for testing (obsolete) — Splinter Review
You can test this on <https://direktnet.raiffeisen.hu/rai/direktnet/home.do>. With the override applied, the login form should be present.
Comment on attachment 670305 [details] [diff] [review] patch >+++ b/dom/base/Navigator.cpp > Navigator::GetUserAgent(nsAString& aUserAgent) >+ NS_ENSURE_SUCCESS(rv, NS_OK); Second arg should be rv. >+ nsCOMPtr<nsIDocument> doc = do_QueryInterface(win->GetExtantDocument()); nsIDocument* doc = win->GetExtantDoc(); r=me with those.
Attachment #670305 - Flags: review?(bzbarsky) → review+
Attachment #670305 - Attachment is obsolete: true
Attachment #670306 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment on attachment 670558 [details] [diff] [review] patch, review comments addressed [Approval Request Comment] Extends our ability to react to sites that are broken due to bad UA sniffing. Bug caused by (feature/regressing bug #): n/a User impact if declined: n/a Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): low, I think String or UUID changes made by this patch: none
Attachment #670558 - Flags: approval-mozilla-beta?
Attachment #670558 - Flags: approval-mozilla-aurora?
Attachment #670558 - Flags: approval-mozilla-beta?
Attachment #670558 - Flags: approval-mozilla-beta+
Attachment #670558 - Flags: approval-mozilla-aurora?
Attachment #670558 - Flags: approval-mozilla-aurora+
Depends on: 814379
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: