#46545 [Opn->Fbk]: get_headers() has problems when get redirected from http to https
| From: | jani@php.net | Date: | Tue, 11 Nov 2008 18:45:22 +0000 |
| Subject: | #46545 [Opn->Fbk]: get_headers() has problems when get redirected from http to https | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-130899@lists.php.net to get a copy of this message | ||
ID: 46545
Updated by: jani@php.net
Reported By: matthias at pc-intern dot com
-Status: Open
+Status: Feedback
Bug Type: HTTP related
Operating System: Debian Etch, PHP 5.2.0-8+etch11
PHP Version: 5.2CVS-2008-11-11 (CVS)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2008-11-11 18:01:51] matthias at pc-intern dot com
btw: works, too: get_headers('https://foo.com');
------------------------------------------------------------------------
[2008-11-11 15:59:46] matthias at pc-intern dot com
Description:
------------
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('http://foo.com');
works: get_headers('http://foo.com?redirect=http://foo2.com');
don't work: get_headers('http://foo.com?redirect=https://foo2.com');
Expected result:
----------------
array (HEADERS);
There should be no problem when a HTTP URL redirectes to an HTTPS URL
Actual result:
--------------
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46545&edit=1