curl-library
Re: Bug#114228: libcurl-dev: Proxy support documentation misleading
Date: Wed, 3 Oct 2001 09:17:16 -0500
Hi Daniel,
> I fell over your bug report at Debian, that seems to indicate a problem in
> libcurl:
Neat :) Did you spot that yourself or did the Debian maintainer send it to
you?
> ------ start snip ---------
> I was trying to extend the simple.c example to work from behind a firewall.
> Reading the curl_easy_setopt(3) manual page suggest that CURLOPT_PROXY and
> CURLOPT_PROXYUSERPWD should enable this.
>
> They don't, or at least not until one also adds CURLOPT_USERPWD -- which
> runs counter to the two paragraphs in the above mentioned manual page.
> Nothing in the text about CURLOPT_USERPWD suggest that it is also needed for
> a proxy.
>
> In fact, as there is a chance that the behaviour is wrong inside the
> library, it would be best if the bug report could be forwarded.
> ------ end of snip -----
>
> Can you provide us with more details on this? Can you show us the VERBOSE
> output from a protocol dump when you connect to/use the proxy without the
> CURLOPT_USERPWD set and one test with it set?
Here you go. "testcurl" is a simple variation on simple.c where I added
CURLOPT_PROXY, CURLOPT_PROXYUSERPWD, and for the purposes of this exercise,
CURLOPT_FILE and CURLOPT_VERBOSE. Unless CURLOPT_USERPWD is also set (and
to the same value as CURLOPT_PROXYUSERPWD), the app is unsuccessful. From
the output, the only difference is the "Authorization:" header. So from my
naive understanding it would appear that curl sees another authentication
request which it attributes to the URL rather than the PROXY.
Script started on Wed Oct 3 09:00:30 2001
black:/tmp/curl> ./testcurl_nouserpwd
* Connected to 192.168.1.2 (192.168.1.2)
> GET http://www.cnn.com/ HTTP/1.1
Proxy-authorization: Basic ZGVkZGVsMDA6bWZFZGQ5OQ==
Host: www.cnn.com
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
* Closing live connection (#0)
black:/tmp/curl> ./testcurl_withuserpwd
* Connected to 192.168.1.2 (192.168.1.2)
> GET http://www.cnn.com/ HTTP/1.1
Proxy-authorization: Basic ZGVkZGVsMDA6bWZFZGQ5OQ==
Authorization: Basic ZGVkZGVsMDA6bWZFZGQ5OQ==
Host: www.cnn.com
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
* Connection (#0) left alive
* Closing live connection (#0)
black:/tmp/curl> exit
exit
Script done on Wed Oct 3 09:00:45 2001
> Also, try upgrading to libcurl 7.9 as that is better.
I just upgraded to the 7.9-1 Debian packages, but no change there. I get the
exact same logging output from the rebuilt testcurl_* apps.
Thanks, Dirk
-- Three out of two people have difficulties with fractions.Received on 2001-10-03