php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69742 HTTPAUTH Not responding to 401 w/creds
Submitted: 2015-06-01 17:31 UTC Modified: 2015-06-01 17:47 UTC
From: mike at geeklabs dot com Assigned:
Status: Closed Package: cURL related
PHP Version: 5.6.9 OS: Ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mike at geeklabs dot com
New email:
PHP Version: OS:

 

 [2015-06-01 17:31 UTC] mike at geeklabs dot com
Description:
------------
On Ubuntu 14.04 with PHP 5.5.9-1ubuntu4.9 (cli) (built: Apr 17 2015 11:44:57) 
and possibly newer, when a webserver sends a 401 error, requesting authentication, PHP is not responding with credentials. Exact same code works on PHP 5.3, 

PHPCURL seems to be ignoring the Apache2 headers, which may be a related issue. 

 


 





Test script:
---------------
curl_setopt($ch, CURLOPT_HTTPAUTH, "CURLAUTH_BASIC"); 
curl_setopt($ch, CURLOPT_USERPWD, "$apilogin:$apipassword");





Expected result:
----------------
I expect it to respond to the 401 with the basic auth credentials.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-01 17:47 UTC] mike at geeklabs dot com
-Status: Open +Status: Closed
 [2015-06-01 17:47 UTC] mike at geeklabs dot com
programmer stupidity, cut and pasted old example with " around CURLAUTH_BASIC begging forgiveness for noise.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC