cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Digest Authentication in php curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 16 Aug 2007 09:11:57 +0200 (CEST)

On Wed, 15 Aug 2007, Luke Painter wrote:

> I'm trying to use curl for digest authentication but I'm getting timeouts.
> Is it possible to use php curl for digest authentication?

Yes indeed.

> I followed a thread about digest authentication for the c api so I know it's
> available in the library directly.

[...]

> $headers[] = 'Accept: */*';

This is already done by libcurl itself.

> $headers[] = "Content-Length: $lengh";

I strongly advice to not set this, as you confuse libcurl greatly if you set
the wrong size. libcurl (or possibly the binding layer) will set this header
by itself to the actual length of the data you pass in anyway.

> curl_setopt($poster, CURLOPT_CONNECTTIMEOUT, 2);

This seems very strict.

> curl_setopt($poster, CURLOPT_CUSTOMREQUEST, 'POST');

Pointless.

For further analysis, please state your libcurl version, your operating system
and how us what response headers you get from this request (CURLOPT_VERBOSE
might help you).

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-08-16