Bug 1595449 - A response header should show HTTP/2 and HTTP/3 instead of HTTP/2.0 and HTTP/3.0. r=kershaw
authorDragana Damjanovic <dd.mozilla@gmail.com>
Mon, 18 Nov 2019 10:26:38 +0000
changeset 502395 66f5e8dbbb864408d9b4e2177ae964c4457fe68c
parent 502394 5dce3091af6eb86c81cc19087fb58f18f1c903f3
child 502396 84919209f983e0c7d71f12a5a5cd4f4edc57675e
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskershaw
bugs1595449
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1595449 - A response header should show HTTP/2 and HTTP/3 instead of HTTP/2.0 and HTTP/3.0. r=kershaw Differential Revision: https://phabricator.services.mozilla.com/D52523
netwerk/protocol/http/nsHttpResponseHead.cpp
--- a/netwerk/protocol/http/nsHttpResponseHead.cpp
+++ b/netwerk/protocol/http/nsHttpResponseHead.cpp
@@ -219,19 +219,19 @@ void nsHttpResponseHead::SetContentLengt
 }
 
 void nsHttpResponseHead::Flatten(nsACString& buf, bool pruneTransients) {
   RecursiveMutexAutoLock monitor(mRecursiveMutex);
   if (mVersion == HttpVersion::v0_9) return;
 
   buf.AppendLiteral("HTTP/");
   if (mVersion == HttpVersion::v3_0) {
-    buf.AppendLiteral("3.0 ");
+    buf.AppendLiteral("3 ");
   } else if (mVersion == HttpVersion::v2_0) {
-    buf.AppendLiteral("2.0 ");
+    buf.AppendLiteral("2 ");
   } else if (mVersion == HttpVersion::v1_1) {
     buf.AppendLiteral("1.1 ");
   } else {
     buf.AppendLiteral("1.0 ");
   }
 
   buf.Append(nsPrintfCString("%u", unsigned(mStatus)) +
              NS_LITERAL_CSTRING(" ") + mStatusText +