cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Mac OS X, NTLM and curl_easy

From: Rudi Sherry <rsherry_at_adobe.com>
Date: Wed, 7 May 2008 09:09:34 -0700

On May 6, 2008, at 8:33 PM, Dan Fandrich wrote:

> Skipping right to traces...
>
>> We then send:
>>
>>
>> PUT /directory/file.pdf HTTP/1.1
>> Authorization: NTLM
>> TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABwAHAHAAAAAVABUAdwAAA
>> AAAAAAAAAAABoKJAn
>> +b2ltxRqcaAAAAAAAAAAAAAAAAAAAAAN1HFzZ0fEvp9HrDKan0dSmyrtfDqlertHJzaGV
>> ycnlyc2hlcnJ5LW9mZmljZS1tYWN0ZWw=
>> Host: webdav.server.com
>> Accept: */*
>> Content-Length: 30
>>
>> STUVWX++ABCDEFGHIJKLMNOPQRSTUV
>
> Is the Content-Length correct in this case, i.e. equal to the
> number of bytes
> actually sent (as opposed to what it should have sent)? If not, then
> that would explain:

Yes, the content length is the same as what we are telling curl to
send (we are using the binary curl included in Mac OS X 10.4.11 and
Mac OS X 1.05.2), and it seems to be (although I haven't counted the
246,000+ bytes exactly) the amount that's being sent. That is, the
"STUVWX" is six bytes sent before the beginning, and the last six
bytes of the real buffer are not sent, so the total is what is being
sent.

>
>> Then we get a mystery reply:
>>
>> HTTP/1.1 400 Bad Request
>> Content-Type: text/html
>> Date: Fri, 25 Apr 2008 21:04:36 GMT
>> Connection: close
>> Content-Length: 35
>>
>> <h1>Bad Request (Invalid Verb)</h1>
>
> ...this mystery reply. The extra data will be treated as a new
> command,
> which it obviously isn't.
>
>> notice:
>> 1. What the heck? I don't know what this is about, I don't know
>> if it's a
>> curl issue or what. I've seen some google traffic that implies
>> IIS is
>> eating the Content-Length bytes; this may be a response to the
>> very first
>> PUT w/o NTLM auth, but I'm not sure.
>
> It sure sounds like a curl problem based on the corrupted data
> showing up
> in the send trace. It actually sounds not altogether dissimilar
> from a
> problem fixed last Saturday. You didn't actually say what version
> of curl
> you're using. It wouldn't be a bad idea to try out the latest curl
> from CVS or the daily snapshot page at http://cool.haxx.se/curl-daily/
> and see if it does happen to be the same issue. I suspect not, but if
> you're using an older version it doesn't hurt to try the latest
> anyway.

Thanks; it will take a little while to get and build the curl (which
we don't currently do), and update our binaries to use that, but it
would be nice to find out if this really is the issue.

Rudi
Received on 2008-05-07