cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Basic Auth error

From: Doug Dalton <ddalton_at_shortbus.net>
Date: Tue, 9 Dec 2008 14:38:56 -0800

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?
if so how should I include this or would you prefer I sent this message to
curl-php?

On Tue, Dec 9, 2008 at 2:28 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:

> On Tue, Dec 09, 2008 at 02:10:18PM -0800, Doug Dalton wrote:
> > I am having a problem with Basic auth with 7.15.5 on centos 5.2 getting
> the
> > error : gss_init_sec_context() failed: : Unknown code krb5 195*
> Authentication
> > problem. Ignoring this.
> >
> > I have my curl set to basic, I notice that it negotiates to NTLM, I am
> not
> > sure if this is causing the issue?
> >
> > curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
> > curl_setopt($ch, CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
>
> The above settings should cause libcurl to send an Authorization: Basic
> header line in the initial request, but it's not:
>
> > 14. > OPTIONS /exchange/ HTTP/1.1
> > 15. User-Agent: Branchit Server Agent
> > 16. Host: webmail.woodcock.com
> > 17. Accept: */*
> > 18. Depth: 1
> > 19. Translate: f
> > 20. Content-Type: text/xml
>
> That implies that the setting is being overridden somehow. Clearly, you're
> not using the C binding, either. Which binding are you using?
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com The web change of address
> service
> Let webmasters know that your web site has moved
>
Received on 2008-12-09