Closed Bug 800157 Opened 8 years ago Closed 8 years ago
Make User Agent overrides affect navigator
.user Agent in addition to the HTTP header
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.
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #670305 - Flags: review?(bzbarsky)
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+
(In reply to Dão Gottwald [:dao] from comment #6) > https://bugzilla.mozilla.org/attachment.cgi?id=670558 wrong link... https://hg.mozilla.org/integration/mozilla-inbound/rev/9f28c28e988f
Status: ASSIGNED → RESOLVED
Closed: 8 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
You need to log in before you can comment on or make changes to this bug.