cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Basic Auth error

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 9 Dec 2008 15:07:46 -0800

On Tue, Dec 09, 2008 at 02:38:56PM -0800, Doug Dalton wrote:
> The php binding
>
> I am also doing a custom header which might explain the issue:
> curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
> curl_setopt($ch, CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
>
> curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "$method");
> if ($method!=HTTP_REQUEST_METHOD_SEARCH)
> $header[]="Depth: 1";
> else
> $header[]="Depth: 0";
> $header[]= "Translate: f";
> $header[]= "Content-Type: text/xml";
> curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
> curl_setopt($ch, CURLOPT_POST, 1);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
>
> Does this override the previous auth?

Those headers shouldn't affect authentication. But it's possible that
the PHP binding might not even support setting the authentication method
as you're doing, or has its own quirks in that area.

> if so how should I include this or would you prefer I sent this message to
> curl-php?

That's the appropriate place for questions about using libcurl on PHP. If
the consensus is that there actually is a bug in libcurl and not PHP/CURL,
then this is the best place (but we'll ask you for some C code or a curl
command-line that shows the bug!).

>>> Dan

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