Pull proxy information from the http_proxy environment variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog:
Make wininet read the proxy information from the environment if it's not
present in the registry.

-- 
Mike Hearn <m.hearn@signal.qinetiq.com>
QinetiQ - Malvern Technology Center
--- dlls/wininet/internet.c.old	2003-06-02 15:12:07.000000000 +0100
+++ dlls/wininet/internet.c	2003-06-02 15:27:07.000000000 +0100
@@ -270,7 +270,15 @@
             } else {
 	      char *http_proxy;
 	      http_proxy = getenv("http_proxy");
-	      WARN("No proxy information available\n");
+	      /* check for a common environment variable */
+	      if (http_proxy) {
+		if ((lpwai->lpszProxy = HeapAlloc( GetProcessHeap(), 0, strlen(http_proxy)+1 ))) {
+		  TRACE("Pulled proxy (%s) from the environment\n", http_proxy);
+		  strcpy( lpwai->lpszProxy, http_proxy );
+		}
+	      } else {
+		WARN("No proxy information available\n");
+	      }
 	    }
 	    
         }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux