Closed Bug 209532 Opened 21 years ago Closed 21 years ago

[Patch] Prefs to override user agent app name and app version

Categories

(Core :: Networking: HTTP, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mpgritti, Assigned: darin.moz)

References

Details

(Keywords: embed)

Attachments

(2 files)

These would make life for embedders a lot easier.
To implement an UA string like suggested in
http://www.mozilla.org/build/revised-user-agent-strings.html
at the moment we need to build the user agent string ourself and to use the
override pref.
Attachment #125740 - Flags: superreview?(darin)
Comment on attachment 125740 [details] [diff] [review]
add the two prefs

r+sr=darin (ok)
Attachment #125740 - Flags: superreview?(darin)
Attachment #125740 - Flags: superreview+
Attachment #125740 - Flags: review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
This hosed my UA string completely in my current cvs build.

My current UA is "/ (X11; U; Linux i686; de-AT; rv:1.6a) Gecko/20031007" !!!

about:config reports general.useragent.contentlocale, general.useragent.locale
and  general.useragent.security set but no other general.useragent.* prefs to be
set to anything.

I guess Mozilla now somehow gets empty strings for appName and appVersion and
uses them.

Java made Mozilla not even start by the following error message:
INTERNAL ERROR on Browser End: Expected a version > 5! Version = 0

This also happens because of this damaged UA string.
Attachment #133008 - Flags: superreview?(darin)
Attachment #133008 - Flags: review?(darin)
*** Bug 221807 has been marked as a duplicate of this bug. ***
reopening
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 133008 [details] [diff] [review]
Possible fix for empty prefs

I've tested this patch and it fixes the regression for me.
*** Bug 221795 has been marked as a duplicate of this bug. ***
The fix seems to work, I have a Mozilla/5.0 user agent again, and Java likes me
again ;-)
Comment on attachment 133008 [details] [diff] [review]
Possible fix for empty prefs

yes, of course!  we actually depend on the other UA string pref values
existing.  otherwise, things just aren't happy.  i should have remembered!

r+sr=darin
Attachment #133008 - Flags: superreview?(darin)
Attachment #133008 - Flags: superreview+
Attachment #133008 - Flags: review?(darin)
Attachment #133008 - Flags: review+
Supplementary fix checked in.
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: