cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NTLM proxy nightmare - POST problem?

From: Jonathan Arnold <jarnold_at_insors.com>
Date: Fri, 09 Mar 2007 18:03:40 -0500

Daniel Stenberg wrote:
> On Fri, 9 Mar 2007, Jonathan Arnold wrote:
>
>> In the Curl_http_auth_act routine, 'perhapsrewind' is called if the
>> request isn't either a POST or a HEAD and if pickhost or pickproxy is
>> true (in this case, pickproxy is true). 'perhapsrewind' sets the
>> conn's rewindaftersend to be true, even though there is nothing to be
>> sent and thus curl just loops, sending nothing and receiving nothing.
>>
>> rewindwaftersend gets set to true because of this peculiar if:
>>
>> http.c(258):
>
> What about the line immediately before that line? It says:
>
> if((expectsend == -1) || (expectsend > bytessent)) {
>
> What are the contents of the variables expectsend and bytessent in this
> case?

expectsend == -1 and bytessent == 0

>> And yes, authproxy.picked == CURLAUTH_NTLM. And expectsend == -1,
>> because it never gets changed from its initial setting (not sure if
>> the HTTPREQ_POST should be picking up a postfieldsize or not).
>
> Ah, you haven't set a postfieldsize. Did you try simply changing your
> app to do that?

I didn't try that, as I thought it was supposed to use strlen to do it. But
maybe that hasn't happened yet. I will try that to see what happens.

> Other than that, I figure we should change the conditionals there to
> make it _always_ do the rewind if expectsend is -1.

Funny - I just came to the opposite conclusion:-)

> Do you have the rewind callback setup?

No, I do not. Again, this happens in both my app and in curl.exe.

-- 
Jonathan Arnold           Software Engineer
inSORS Integrated Communications, Inc
jarnold_at_insors.com Office/fax: 781.391.2818
Received on 2007-03-10