cURL / Mailing Lists / curl-library / Single Mail



From: Jerry G. Chiuan <>
Date: Sun, 28 Sep 2003 13:23:52 -0700

  Jerry G. Chiuan wrote:

> Jerry G. Chiuan wrote:
> >I use CURLOPT_PROXYUSERPWD for my proxy authenticaiton.
> >however, I found my app keeps retrying and the proxy keeps returning "Proxy
> >Authentication Required"
> >I also found that the app never sends out "username:passwd"
> >( I use sniffer to capture all packets to debug )
> >
> Squid uses BASIC authentification. You will see the username:passwd only
> Base64 encoded.
> Lookup for a line with the header-tag "Authorization:"
> Authorization: Basic <Base64>

    But I don't see any stuff in http header like "Authorization:"
    what is the problem usually when this happens?

    basically, I only insert one more line into my codes for proxy authentication
    curl_easy_setopt(easyHandle, CURLOPT_PROXYUSERPWD, "loginname:passwd");

  Do you already have:

      curl_easy_setopt(easyHandle, CURLOPT_PROXY, "");

  in there somewhere?? If not, curl won't be finding your proxy...

  Ralph Mitchell

  Yes, I have added it and my app can go through proxy without authentication
  But whenever I would like to try CURLOPT_PROXYUSERPWD to go through my squid proxy with basic authentication, the problem mentioned above occurs
  I can't even see the "Authentication: " header field shown in http header part of my app's requests toward the squid proxy.

  I think a lot of people have used this feature, do you guys have problems?

  - Jerry

This email is sponsored by:ThinkGeek
Welcome to geek heaven.
Received on 2003-09-28