#46545 [Opn]: get_headers() has problems when get redirected from http to https

From: Date: Tue, 11 Nov 2008 18:01:52 +0000
Subject: #46545 [Opn]: 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-130896@lists.php.net to get a copy of this message
ID: 46545 User updated by: matthias at pc-intern dot com Reported By: matthias at pc-intern dot com Status: Open Bug Type: HTTP related Operating System: Debian Etch, PHP 5.2.0-8+etch11 PHP Version: 5.2CVS-2008-11-11 (CVS) New Comment: btw: works, too: get_headers('https://foo.com'); Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#130896) next »