char proxyuser[MAX_CURL_USER_LENGTH];
char proxypasswd[MAX_CURL_PASSWORD_LENGTH];
+ char *fineptr;
+
/* skip the possible protocol piece */
ptr=strstr(proxy, "://");
if(ptr)
else
ptr = proxy;
+ fineptr = ptr;
+
/* check for an @-letter */
ptr = strchr(ptr, '@');
- if(ptr && (2 == sscanf(proxy, "%" MAX_CURL_USER_LENGTH_TXT"[^:]:"
+ if(ptr && (2 == sscanf(fineptr,
+ "%" MAX_CURL_USER_LENGTH_TXT"[^:]:"
"%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
proxyuser, proxypasswd))) {
/* found user and password, rip them out */
conn->bits.proxy_user_passwd = TRUE; /* enable it */
- ptr = strdup(ptr+1);
+ ptr = strdup(ptr+1); /* the right side of the @-letter */
free(proxy); /* free the former data */
proxy = ptr; /* now use this instead */
}
</strip>
<protocol>
GET http://we.want.that.site.com/63 HTTP/1.1\r
-Proxy-authorization: Basic aHR0cDovL2Zha2U6dXNlcg==
+Proxy-authorization: Basic ZmFrZTp1c2Vy
Host: we.want.that.site.com\r
Pragma: no-cache\r
Accept: */*\r