diff options
Diffstat (limited to 'netwerk/base')
-rw-r--r-- | netwerk/base/LoadInfo.cpp | 6 | ||||
-rw-r--r-- | netwerk/base/LoadInfo.h | 1 | ||||
-rw-r--r-- | netwerk/base/NetUtil.jsm | 35 | ||||
-rw-r--r-- | netwerk/base/nsICryptoHash.idl | 3 | ||||
-rw-r--r-- | netwerk/base/nsSocketTransport2.cpp | 16 | ||||
-rw-r--r-- | netwerk/base/nsSocketTransportService2.cpp | 11 |
6 files changed, 45 insertions, 27 deletions
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp index 216cf559c..42fdea4a1 100644 --- a/netwerk/base/LoadInfo.cpp +++ b/netwerk/base/LoadInfo.cpp @@ -859,6 +859,12 @@ LoadInfo::SetIsPreflight() mIsPreflight = true; } +void +LoadInfo::SetUpgradeInsecureRequests() +{ + mUpgradeInsecureRequests = true; +} + NS_IMETHODIMP LoadInfo::GetIsPreflight(bool* aIsPreflight) { diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h index 261f85349..3e1b92ff4 100644 --- a/netwerk/base/LoadInfo.h +++ b/netwerk/base/LoadInfo.h @@ -78,6 +78,7 @@ public: already_AddRefed<nsILoadInfo> CloneForNewRequest() const; void SetIsPreflight(); + void SetUpgradeInsecureRequests(); private: // private constructor that is only allowed to be called from within diff --git a/netwerk/base/NetUtil.jsm b/netwerk/base/NetUtil.jsm index e970c8ad8..93025e97e 100644 --- a/netwerk/base/NetUtil.jsm +++ b/netwerk/base/NetUtil.jsm @@ -363,6 +363,41 @@ this.NetUtil = { }, /** + * @deprecated Use newChannel({ ...options... }) instead. + */ + newChannel2: function NetUtil_newChannel2(aWhatToLoad, + aOriginCharset, + aBaseURI, + aLoadingNode, + aLoadingPrincipal, + aTriggeringPrincipal, + aSecurityFlags, + aContentPolicyType) + { + if (!aWhatToLoad) { + let exception = new Components.Exception( + "Must have a non-null string spec, nsIURI, or nsIFile object", + Cr.NS_ERROR_INVALID_ARG, + Components.stack.caller + ); + throw exception; + } + + let uri = aWhatToLoad; + if (!(aWhatToLoad instanceof Ci.nsIURI)) { + // We either have a string or an nsIFile that we'll need a URI for. + uri = this.newURI(aWhatToLoad, aOriginCharset, aBaseURI); + } + + return this.ioService.newChannelFromURI2(uri, + aLoadingNode, + aLoadingPrincipal, + aTriggeringPrincipal, + aSecurityFlags, + aContentPolicyType); + }, + + /** * Reads aCount bytes from aInputStream into a string. * * @param aInputStream diff --git a/netwerk/base/nsICryptoHash.idl b/netwerk/base/nsICryptoHash.idl index cd865a3a9..ddd3103af 100644 --- a/netwerk/base/nsICryptoHash.idl +++ b/netwerk/base/nsICryptoHash.idl @@ -10,7 +10,7 @@ interface nsIInputStream; * This interface provides crytographic hashing algorithms. */ -[scriptable, uuid(1e5b7c43-4688-45ce-92e1-77ed931e3bbe)] +[scriptable, uuid(0a248513-dfa7-4474-8777-8c452d60dd04)] interface nsICryptoHash : nsISupports { /** @@ -25,6 +25,7 @@ interface nsICryptoHash : nsISupports const short SHA256 = 4; /* String value: "sha256" */ const short SHA384 = 5; /* String value: "sha384" */ const short SHA512 = 6; /* String value: "sha512" */ + const short SHA224 = 7; /* String value: "sha224" */ /** * Initialize the hashing object. This method may be diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp index 1bfd1fc91..184757d33 100644 --- a/netwerk/base/nsSocketTransport2.cpp +++ b/netwerk/base/nsSocketTransport2.cpp @@ -40,7 +40,6 @@ #include "xpcpublic.h" #if defined(XP_WIN) -#include "mozilla/WindowsVersion.h" #include "ShutdownLayer.h" #endif @@ -1724,21 +1723,6 @@ nsSocketTransport::OnSocketConnected() NS_ASSERTION(mFDref == 1, "wrong socket ref count"); SetSocketName(mFD); mFDconnected = true; - -#ifdef XP_WIN - if (!IsWin2003OrLater()) { // windows xp - PRSocketOptionData opt; - opt.option = PR_SockOpt_RecvBufferSize; - if (PR_GetSocketOption(mFD, &opt) == PR_SUCCESS) { - SOCKET_LOG(("%p checking rwin on xp originally=%u\n", - this, opt.value.recv_buffer_size)); - if (opt.value.recv_buffer_size < 65535) { - opt.value.recv_buffer_size = 65535; - PR_SetSocketOption(mFD, &opt); - } - } - } -#endif } // Ensure keepalive is configured correctly if previously enabled. diff --git a/netwerk/base/nsSocketTransportService2.cpp b/netwerk/base/nsSocketTransportService2.cpp index d2f20651e..068bf0eca 100644 --- a/netwerk/base/nsSocketTransportService2.cpp +++ b/netwerk/base/nsSocketTransportService2.cpp @@ -28,10 +28,6 @@ #include "nsIWidget.h" #include "mozilla/dom/FlyWebService.h" -#if defined(XP_WIN) -#include "mozilla/WindowsVersion.h" -#endif - namespace mozilla { namespace net { @@ -1204,12 +1200,7 @@ nsSocketTransportService::UpdateSendBufferPref(nsIPrefBranch *pref) } #if defined(XP_WIN) - // If the pref is not set but this is windows set it depending on windows version - if (!IsWin2003OrLater()) { // windows xp - mSendBufferSize = 131072; - } else { // vista or later - mSendBufferSize = 131072 * 4; - } + mSendBufferSize = 131072 * 4; #endif } |