cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [Q]: http proxy authorization using libcurl ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Aug 2003 09:13:35 +0200 (CEST)

On Sat, 9 Aug 2003 jskuo_at_cht.com.tw wrote:

> It's also fine when I used the command-line version curl.exe in the dos-box.
> I issues such a command in the dos-box and it's ok.
> "curl --proxy 10.100.100.100:8080 --proxy-user user_abc:passwd_abc
> --dump-header a.txt --verbose www.google.com"
>
> It's fine when fetching pages in those sites behind my http proxy using
> my program called libcurl directly.
> However, when my program tried to access those pages outside of proxy,
> some problems got, especially in proxy authorization.

I don't think I follow you here. You can get pages fine through the proxy, but
not without it? Isn't that because of how your network is setup?

> When I issue these instructions in my program, te libcurl returned a code of
> 5 which means
>
> "Couldn't resolve proxy. The given proxy host could not be resolved." found
> in http://curl.haxx.se/libcurl/c/libcurl-errors.html

That would indicate that you passed a bad proxy name to libcurl.

> It seemed that I didn't submit correct username and password.

It does. Check the headers libcurl sends off when used with your program and
compare them with those that curl the tool sends off. The Proxy-Authorization:
headers should be identical.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-11