cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: POST call via proxy with authentication

From: Matteo Rocco <vanrock.web_at_gmail.com>
Date: Thu, 11 Jan 2007 13:46:55 +0100

2007/1/10, Daniel Stenberg <daniel_at_haxx.se>:
>
> On Wed, 10 Jan 2007, Matteo Rocco wrote:
>
> > I have this result :-(
>
> I'll ignore the 7.16.0 tests and the ones that work in CVS HEAD and skip
> directly to the one that files with recent code:
>
> Unfortunally I must use 7.16.0 so I'm trying to understand and solve the
problem.
I have made other tests and i'll try to be more clear.

libcurl 7.16 - ISA BASIC

1) POST call to php script
2) first call to Curl_readwrite
3) receive:
HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires
authorization to fulfill the request. Access to the Web Proxy service is
denied. )
Via:1.1 ISABASIC
Proxy-Authenticate: Basic realm="isabasic."
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 2360

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
etc..

4) the data retrieved from Curl_read call is NOT 2360 bytes long but only
1460
5) send second request for basic authentication
6) read the rest of the response of first call
7) read response for second call

At point 6) the first line is not the header (is part of html response of
the proxy) so it's interpreted
as badheader (k->badheader = HEADER_PARTHEADER;) and everything gets
returned to the client like the response
of the php script. Following that "bad header" I see also all headers and
content of second call appended

This occur only in release version.
In debug version Curl_read reads all bytes (2361) one time
If I put a MessageBox before Curl_read in release it reads all bytes
If I activate CURLOPT_DEBUGFUNCTION in release it work 99 times out of 100

Someone can help me?

Thanks in advance

Matteo
Received on 2007-01-11