Back out bug 235853 due to unit mochitest failures
authorgavin@gavinsharp.com
Tue, 25 Mar 2008 11:35:25 -0700
changeset 13539 7a626b34a765960589f039c1136f1995f61cab55
parent 13538 3b6a7bbe74577b5525509adfec2bc6200300d3b6
child 13540 acb5456539c668d3ec0ec755dd3b64ddb56363d2
child 13543 770bdf4e1868f21e76c19787a4b8cd3d74e08323
push idunknown
push userunknown
push dateunknown
bugs235853
milestone1.9b5pre
Back out bug 235853 due to unit mochitest failures
netwerk/base/src/nsIOService.cpp
netwerk/base/src/nsProtocolProxyService.cpp
--- a/netwerk/base/src/nsIOService.cpp
+++ b/netwerk/base/src/nsIOService.cpp
@@ -545,27 +545,17 @@ nsIOService::NewChannelFromURI(nsIURI *a
     if (protoFlags & nsIProtocolHandler::ALLOWS_PROXY) {
         nsCOMPtr<nsIProxyInfo> pi;
         if (!mProxyService) {
             mProxyService = do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID);
             if (!mProxyService)
                 NS_WARNING("failed to get protocol proxy service");
         }
         if (mProxyService) {
-            PRUint32 flags = 0;
-            if (scheme.EqualsLiteral("http") || scheme.EqualsLiteral("https"))
-                flags = nsIProtocolProxyService::RESOLVE_NON_BLOCKING;
-            rv = mProxyService->Resolve(aURI, flags, getter_AddRefs(pi));
-            if (rv == NS_BASE_STREAM_WOULD_BLOCK) {
-                // Use an UNKNOWN proxy to defer resolution and avoid blocking.
-                rv = mProxyService->NewProxyInfo(NS_LITERAL_CSTRING("unknown"),
-                                                 NS_LITERAL_CSTRING(""),
-                                                 -1, 0, 0, nsnull,
-                                                 getter_AddRefs(pi));
-            }
+            rv = mProxyService->Resolve(aURI, 0, getter_AddRefs(pi));
             if (NS_FAILED(rv))
                 pi = nsnull;
         }
         if (pi) {
             nsCAutoString type;
             if (NS_SUCCEEDED(pi->GetType(type)) && type.EqualsLiteral("http")) {
                 // we are going to proxy this channel using an http proxy
                 rv = GetProtocolHandler("http", getter_AddRefs(handler));
--- a/netwerk/base/src/nsProtocolProxyService.cpp
+++ b/netwerk/base/src/nsProtocolProxyService.cpp
@@ -918,18 +918,17 @@ nsProtocolProxyService::NewProxyInfo(con
                                      PRUint32 aFailoverTimeout,
                                      nsIProxyInfo *aFailoverProxy,
                                      nsIProxyInfo **aResult)
 {
     static const char *types[] = {
         kProxyType_HTTP,
         kProxyType_SOCKS,
         kProxyType_SOCKS4,
-        kProxyType_DIRECT,
-        kProxyType_UNKNOWN
+        kProxyType_DIRECT
     };
 
     // resolve type; this allows us to avoid copying the type string into each
     // proxy info instance.  we just reference the string literals directly :)
     const char *type = nsnull;
     for (PRUint32 i=0; i<NS_ARRAY_LENGTH(types); ++i) {
         if (aType.LowerCaseEqualsASCII(types[i])) {
             type = types[i];