Bug 1302400 - Set docshell UA override for redirected channels in the child r=mcmanus a=ritu
authorValentin Gosu <valentin.gosu@gmail.com>
Thu, 13 Oct 2016 15:50:50 +0200
changeset 358371 32b9ee5821565de88218859c80920352fa9626da
parent 358370 b1c2d90536fc1798018c1fc78872846dcfb177d1
child 358372 174c8427ef9fa804cf256e823f7f95042a135470
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, ritu
bugs1302400
milestone51.0a2
Bug 1302400 - Set docshell UA override for redirected channels in the child r=mcmanus a=ritu MozReview-Commit-ID: 3rmoAfpvml0
netwerk/protocol/http/HttpChannelChild.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1473,16 +1473,18 @@ HttpChannelChild::ConnectParent(uint32_t
   if (MissingRequiredTabChild(tabChild, "http")) {
     return NS_ERROR_ILLEGAL_VALUE;
   }
 
   if (tabChild && !tabChild->IPCOpen()) {
     return NS_ERROR_FAILURE;
   }
 
+  HttpBaseChannel::SetDocshellUserAgentOverride();
+
   // The socket transport in the chrome process now holds a logical ref to us
   // until OnStopRequest, or we do a redirect, or we hit an IPDL error.
   AddIPDLReference();
 
   HttpChannelConnectArgs connectArgs(registrarId, mShouldParentIntercept);
   PBrowserOrId browser = static_cast<ContentChild*>(gNeckoChild->Manager())
                          ->GetBrowserOrId(tabChild);
   if (!gNeckoChild->