 +                /* We found HTTP proxy value, then use it */
 +                proxy = strdup( tok + 5 );
 +              }
++              tok = strtok(NULL, ";");
 +            }
-+            while(NULL != strtok(NULL, ";"));
++            while(NULL != tok);
 +          }
 +        }
 +      }

 
 #ifndef CURL_DISABLE_HTTP
   /* If proxy was not specified, we check for default proxy environment
@@ -4138,7 +4158,62 @@ 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.
    */

+      ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass);
+
+      /* Convert the ieNoProxy into a proper no_proxy value */
+      if(NULL != ieNoProxy) {
+        no_proxy = strdup(ieNoProxy);
+        pos = strpbrk(no_proxy, "; ");
+        while(NULL != pos) {
