On Thu, 24 Mar 2011, taher daryani wrote:

I am using libcurl to send http/https requests through a proxy. It works fine for http requests but it returns error 407 for https requests if I use CURLAUTH_ANY.

That's expected and normal. libcurl then picks the "best" auth type it knows (among those that the server says it allows) and connects again.

If I use CURLAUTH_BASIC then the request would succeed.

So the server only rejects libcurl if a single CONNECT is made? Or is there a difference between the BASIC-at-once request and the BASIC-after-the-prope-connect request?

What libcurl version is this on what platform?

* Proxy auth using Basic with user 'user'
CONNECT x.x.net:443 HTTP/1.0
Host: x.x.net:443
Proxy-Authorization: Basic dXNlcjpwYXPbs29yZA==
User-Agent: Company Product
Proxy-Connection: Keep-Alive
Content-Type: text/xml
Accept-Language: -

* Proxy CONNECT aborted
* Closing connection #0
* Failure when receiving data from the peer

That seems to be a Curl_read() that returns error so it looks like the proxy is really not liking it. (around lib/http.c:1479 in my current dev code)

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to