cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Mac OS X, NTLM and curl_easy

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 6 May 2008 20:33:27 -0700

On Tue, May 06, 2008 at 05:07:43PM -0700, Rudi Sherry wrote:
> We are experiencing problems with curl_easy on the mac talking to an IIS
> server that uses NTLM authentication.
>
> I think this may be a known bug, as follows in Known Bugs, but it is not an
> auth failure so I'm not sure.

If you're using a single easy handle for the entire authentication phase,
then it's likely not this issue.

Skipping right to traces...

> We then send:
>
>
> PUT /directory/file.pdf HTTP/1.1
> Authorization: NTLM
> TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABwAHAHAAAAAVABUAdwAAAAAAAAAAAAAABoKJAn+b2ltxRqcaAAAAAAAAAAAAAAAAAAAAAN1HFzZ0fEvp9HrDKan0dSmyrtfDqlertHJzaGVycnlyc2hlcnJ5LW9mZmljZS1tYWN0ZWw=
> 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:

> 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.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-05-07