diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index e216ed495a5..58ae0aabd8a 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -659,6 +659,18 @@ nsHttpHandler::BuildUserAgent() mUserAgent += '/'; mUserAgent += mProductSub; + // "Firefox/x.y.z" compatibility token + if (!mCompatFirefox.IsEmpty()) { + mUserAgent += ' '; + mUserAgent += mCompatFirefox; + } + + // App portion + mUserAgent += ' '; + mUserAgent += mAppName; + mUserAgent += '/'; + mUserAgent += mAppVersion; + // Vendor portion if (!mVendor.IsEmpty()) { mUserAgent += ' '; @@ -668,16 +680,6 @@ nsHttpHandler::BuildUserAgent() mUserAgent += mVendorSub; } } - - mUserAgent += ' '; - mUserAgent += mAppName; - mUserAgent += '/'; - mUserAgent += mAppVersion; - - if (!mCompatFirefox.IsEmpty()) { - mUserAgent += ' '; - mUserAgent += mCompatFirefox; - } } #ifdef XP_WIN