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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 13:01:33 2025 UTC