cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: problem with pw protected web sites

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 27 Apr 2001 09:57:15 +0200 (MET DST)

On Thu, 26 Apr 2001, Hailer, Jeff wrote:

> Is it possible to combine the -U and -u options in the same request?

Yes.

> My command line resembles the following:
>
> /usr/local/bin/curl -U fwid:fwidpw -x http://proxyserver.com:80 -u
> wsid:wsidpw -s --location -m 20 -i http://pwprotectedws.com/
>
> Non-password protected web sites work just fine.

Well. I just added a test case for this particular combination, and when I
run a command like (taken from my new test case numbered 41)

 curl -U proxy:pppp -u site:moooo -x %HOSTIP:%HOSTPORT \
   http://weeird.site.com/YES/boo/2

Curl sends this:

GET http://weeird.site.com/YES/boo/2 HTTP/1.1
Proxy-authorization: Basic cHJveHk6cHBwcA==
Authorization: Basic c2l0ZTptb29vbw==
User-Agent: curl/7.7.2 (sparc-sun-solaris2.7) libcurl 7.7.2 (OpenSSL 0.9.6a) \
 (krb4 enabled)
Host: weeird.site.com
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

... which I can only approve of.

What you might need to do:

o Verify that curl sends the proper headers to your proxy (by dumping them
  with -v).
o If you're ambitious, verify that the base64-chunks are correct. They're
  likely to be correct since they work independently...
o Find out why your proxy eats the Authorization: header and doesn't
  forward it as it should to the remote site.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2001-04-27