Bug 1175545 - Dont process alt-svc on 421 r=hurley
authorPatrick McManus <mcmanus@ducksong.com>
Fri, 19 Jun 2015 08:32:05 -0400
changeset 267862 5a2ecacde67d54a78d012cae732613684163098e
parent 267861 d33e17744ddf38fe58795fba7788361a62348fae
child 267863 13a9a4428a6867e97dd8fb6c9f551ef142e58755
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1175545
milestone41.0a1
Bug 1175545 - Dont process alt-svc on 421 r=hurley
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -1370,17 +1370,17 @@ nsHttpChannel::ProcessResponse()
     // notify "http-on-examine-response" observers
     gHttpHandler->OnExamineResponse(this);
 
     // Cookies and Alt-Service should not be handled on proxy failure either.
     // This would be consolidated with ProcessSecurityHeaders but it should
     // happen after OnExamineResponse.
     if (!mTransaction->ProxyConnectFailed() && (httpStatus != 407)) {
         SetCookie(mResponseHead->PeekHeader(nsHttp::Set_Cookie));
-        if (httpStatus < 500) {
+        if ((httpStatus < 500) && (httpStatus != 421)) {
             ProcessAltService();
         }
     }
 
     // handle unused username and password in url (see bug 232567)
     if (httpStatus != 401 && httpStatus != 407) {
         if (!mAuthRetryPending)
             mAuthProvider->CheckForSuperfluousAuth();