cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Request for help with: Entering both a proxy user id and password AND a user id and password for the URL in cURL

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Thu, 30 Jul 2009 13:20:19 -0500

On Thu, Jul 30, 2009 at 1:00 PM, Mike Hutchinson <
mike.hutchinson_at_uk.rsagroup.com> wrote:

>
>
> Hi,
>
> I have searched the web for some time but not found any answers to this
> cURL problem so any help would be appreciated.
>
> Problem:
> I need to enter BOTH of the following as part of the same cURL command line
> or in the cURL configuration file.
> 1. A user Id and password to log in through our proxy server
> 2. A completely different user id and password to connect to the URL that I
> am trying to use.
>
> cURL version I am using is
> User-Agent: curl/7.19.5 (i386-pc-win32) libcurl/7.19.5 OpenSSL/0.9.8k
> zlib/1.2.3 libidn/1.13 libssh2/1.1
> I am running on a windows 32 platform using https protocol for the URL
>
> I have tried entering the -u userid:password details twice on the command
> line once for each set of log-on details.
> I have tried entering the proxy log-on details in the -u switch and then
> wrapping the website log-on details as part of the URL e.g
> -u proxylogon:proxypassword userid:password@https://myurl
>
> The only way I can currently get cURL to successfully log-on to the website
> is to
> a) first manually log-on to the proxy server through Internet explorer etc
> and connect to the Internet.
> b) use the -x switch to specify the proxy URL and port
> c) use the -u switch to hold the website log-on and password details
>

You should be using "-U userid:passwd" to send userid and password to the
proxy. The lowercase -u option is for logging into the web server using,
for example, Basic Authentication.

Ralph Mitchell

-------------------------------------------------------------------
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-07-30