Bug 581783 - Remove "Windows;" from the UA string. r=bz

This commit is contained in:
Dão Gottwald 2010-08-05 09:09:42 +02:00
parent a511e5c466
commit fad97a8202

View File

@ -121,6 +121,9 @@ static NS_DEFINE_CID(kSocketProviderServiceCID, NS_SOCKETPROVIDERSERVICE_CID);
#define UA_PREF_PREFIX "general.useragent."
#define UA_APPNAME "Mozilla"
#define UA_APPVERSION "5.0"
#ifdef XP_WIN
#define UA_SPARE_PLATFORM
#endif
#define HTTP_PREF_PREFIX "network.http."
#define INTL_ACCEPT_LANGUAGES "intl.accept_languages"
@ -602,7 +605,9 @@ nsHttpHandler::BuildUserAgent()
// than if we didn't preallocate at all.
mUserAgent.SetCapacity(mAppName.Length() +
mAppVersion.Length() +
#ifndef UA_SPARE_PLATFORM
mPlatform.Length() +
#endif
mOscpu.Length() +
mMisc.Length() +
mProduct.Length() +
@ -622,8 +627,10 @@ nsHttpHandler::BuildUserAgent()
// Application comment
mUserAgent += '(';
#ifndef UA_SPARE_PLATFORM
mUserAgent += mPlatform;
mUserAgent.AppendLiteral("; ");
#endif
mUserAgent += mOscpu;
if (!mMisc.IsEmpty()) {
mUserAgent.AppendLiteral("; ");