|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46545 get_headers() has problems when get redirected from http to https
Submitted: 2008-11-11 15:59 UTC Modified: 2008-11-11 20:38 UTC
From: matthias at pc-intern dot com Assigned:
Status: Closed Package: HTTP related
PHP Version: 5.2CVS-2008-11-11 (CVS) OS: Debian Etch, PHP 5.2.0-8+etch11
Private report: No CVE-ID: None
 [2008-11-11 15:59 UTC] matthias at pc-intern dot com
If you check an HTTP URL with get_headers() function which redirects to another HTTPS URL, NULL will returned. If the redirect-HTTPS-URL is checked directly, there is no error. extension=php_openssl.dll is enabled.

Reproduce code:
works: get_headers('');
works: get_headers('');
don't work: get_headers('');

Expected result:
array (HEADERS);
There should be no problem when a HTTP URL redirectes to an HTTPS URL

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-11 18:01 UTC] matthias at pc-intern dot com
btw: works, too: get_headers('');
 [2008-11-11 18:45 UTC]
Please try using this CVS snapshot:
For Windows:

 [2008-11-11 20:38 UTC] matthias at pc-intern dot com
I updated and now it works, thx!
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 15 11:01:24 2021 UTC