curl-users
Re: how to use --proxy-negotiate, exactly?
Date: Mon, 23 Feb 2009 00:30:12 +0000 (UTC)
On Sun, 22 Feb 2009 15:43:25 -0800, Dan Fandrich wrote:
>
> You need to specify the --proxy-user option to enable the negotation.
Not sure why it can't use the username in the http_proxy environment
variable, but even with --proxy-user, it still doesn't work:
$ http_proxy=http://brian@linux:3128/ ./curl -v --proxy-user brian --proxy-negotiate -o /dev/null http://www.sun.com/
Enter proxy password for user 'brian': ******
* About to connect() to proxy linux port 3128 (#0)
* Trying 10.75.22.3... connected
* Connected to linux (10.75.22.3) port 3128 (#0)
> GET http://www.sun.com/ HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8
> Host: www.sun.com
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* HTTP 1.0, assume close after body
< HTTP/1.0 407 Proxy Authentication Required
< Server: squid/3.0.STABLE10
< Mime-Version: 1.0
< Date: Mon, 23 Feb 2009 00:27:05 GMT
< Content-Type: text/html
< Content-Length: 1624
< Expires: Mon, 23 Feb 2009 00:27:05 GMT
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
< Proxy-Authenticate: Negotiate
< Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
< X-Cache: MISS from linux
< X-Cache-Lookup: NONE from linux:3128
< Via: 1.0 linux (squid/3.0.STABLE10)
< Proxy-Connection: close
<
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 1624 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Closing connection #0
* Issue another request to this URL: 'http://www.sun.com/'
* About to connect() to proxy linux port 3128 (#0)
* Trying 10.75.22.3... connected
* Connected to linux (10.75.22.3) port 3128 (#0)
> GET http://www.sun.com/ HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8
> Host: www.sun.com
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* HTTP 1.0, assume close after body
< HTTP/1.0 407 Proxy Authentication Required
< Server: squid/3.0.STABLE10
< Mime-Version: 1.0
< Date: Mon, 23 Feb 2009 00:27:05 GMT
< Content-Type: text/html
< Content-Length: 1624
< Expires: Mon, 23 Feb 2009 00:27:05 GMT
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
* Authentication problem. Ignoring this.
< Proxy-Authenticate: Negotiate
< Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
< X-Cache: MISS from linux
< X-Cache-Lookup: NONE from linux:3128
< Via: 1.0 linux (squid/3.0.STABLE10)
< Proxy-Connection: close
<
{ [data not shown]
100 1624 100 1624 0 0 26332 0 --:--:-- --:--:-- --:--:-- 26332* Closing connection #0
b.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-02-23