cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Issue with HTTP Post with Authentication - curl 7.12.2

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 12 Dec 2005 09:08:40 -0800

On Mon, Dec 12, 2005 at 08:57:50PM +0530, Rathi, Dinesh wrote:
> Hi
>
> I am using curl library version 7.12.2 and trying to make Web
> Service calls over HTTP using libcurl (i.e. HTTP Post requests). My web service
> requires authentication so I set appropriate options, however for some reason
> curl does not send Post request directly, it first tries to send a Head request
> which fails since server does not support head requests. I tried to look into
> the code and found that in Curl_http method (file http.c) we have following
> piece of code, which makes the Head request before the post. I commented this
> logic and things worked fine, now I am not sure what is the side-effect of
> this, does anyone has more information?

This behaviour was changed in version 7.12.3; to wit:

- Made HTTP PUT and POST requests no longer use HEAD when doing multi-pass
  auth negotiation (NTLM, Digest and Negotiate), but instead use the request
  keyword "properly". Details in lib/README.httpauth. This also introduces
  CURLOPT_IOCTLFUNCTION and CURLOPT_IOCTLDATA, to be used by apps that use the
  "any" auth alternative as then libcurl may need to send the PUT/POST data
  more than once and thus may need to ask the app to "rewind" the read data
  stream to start.

There have been other POST fixes since then, so try upgrading to 7.15.1.

>>> Dan

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