 +      /* Convert the ieNoProxy into a proper no_proxy value */
 +      no_proxy = strdup(ieNoProxy);
 +      pos = strpbrk(no_proxy, "; ");
-+      while (NULL != pos) {
++      while(NULL != pos) {
 +        no_proxy[pos-no_proxy] = ',';
 +        pos = strpbrk(no_proxy, "; ");
 +      }

 #include "urldata.h"
 #include "netrc.h"
 
@@ -4111,6 +4115,21 @@ static bool check_noproxy(const char* name, const char* no_proxy)
   return FALSE;
 }
 

 
 #ifndef CURL_DISABLE_HTTP
   /* If proxy was not specified, we check for default proxy environment
@@ -4138,7 +4158,58 @@ static char *detect_proxy(struct connectdata *conn)
    * For compatibility, the all-uppercase versions of these variables are
    * checked if the lowercase versions don't exist.
    */
-  char *no_proxy=NULL;
+#ifdef WIN32
+  WINHTTP_CURRENT_USER_IE_PROXY_CONFIG *ieProxyConfig;
+  ieProxyConfig = (WINHTTP_CURRENT_USER_IE_PROXY_CONFIG*)
+    malloc(sizeof(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG));
+  if(WinHttpGetIEProxyConfigForCurrentUser(ieProxyConfig)) {
+    if(!ieProxyConfig->fAutoDetect) {
+      char *ieProxy;
