Closed Bug 848 Opened 26 years ago Closed 26 years ago

Viewer App Reports incorrect HTTP_USER_AGENT version

Categories

(Core Graveyard :: Viewer App, defect, P1)

x86
Other
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: jud)

Details

NGLayout for Windows reports that is the WinNT version of Netscape 4.05. This is done on line 516 of /webshell/tests/viewer/nsViewerApp.cpp . The string is currently set to "4.05 [en] (WinNT;I)". It should probably be set to something like "5.5b0 NGLayout" and possibly contain a build date or platform. However, it is very important that it be changed to *anything else* because the reporting version 4.05 causes NGLayout to receive browser-sniffed versions of CSS for Win Navigator 4 that don't send the stuff that crashes Navigator 4 (lots of stuff). However, you may need to use a version number such as 5.5test or 6.0test for the benefit of other types of browser sniffing (I'm not sure what is out there). This is related to bug 806, but I think this should be changed even before a cross-platform way of changing it is made so that NGLayout can be tested properly.‰
Assignee: scullin → vidur
Assignee: vidur → valeski
Judson is the right person for user-agent/netlib issues.
I see the hardcoding of version 4.05 has moved to network/module/nsNetService.cpp line 157. It looks more difficult to change here, because I was thinking you could do what webshell/tests/viewer/nsViewerApp.cpp does at line 78-79 by reading the NGLAYOUT_HOME variable. I would suggest reading (the environment variable) NGLAYOUT_UA to get the whole string or reading NGLAYOUT_VER to get the version number to report as HTTP_USER_AGENT. ‰
David, want to try implementing this? If so, just reassign the bug to yourself and submit the patch to valeski@netscape.com. I like the environment variable approach.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
took the env variable approach. Set NG_REQUEST_VER to whatever you want.
asking dbaron to verify this bug.
Status: RESOLVED → VERIFIED
Verified fixed. User agent strings are now: Mozilla/5.0 [en] (MacPPC; I) Mozilla/5.0 [en] (Win95; I) Mozilla/5.0 [en] (Unix; I) dbaron, please re-open if there's anything wrong with these user agent strings; thanks!
Verified. Been using it for months. (Note: The default was recently changed to 5.0, solving the original problem in both ways.)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.