ID: 43749 Updated by: [EMAIL PROTECTED] Reported By: jeremy dot amiot at gmail dot com -Status: Open +Status: Bogus Bug Type: HTTP related Operating System: Linux 2.4 PHP Version: 5.2.5 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The returned Location header incorrectly contains spaces. You can get the response header (before the failure) from the $http_response_header array. Previous Comments: ------------------------------------------------------------------------ [2008-01-04 12:02:26] jeremy dot amiot at gmail dot com Description: ------------ Hello, get_headers() fails with this king of URL : http://www.radioblogclub.com/listen.php?u=..wLzRmb192cv8mZulmLzRmcvNWZy9Gb1NmcvBnch12b0FmL3d3d/Wolf%2520Eyes%2520-%2520The%2520driller.rbs&k=657ecb3231ac0b275497d4d6f00b61a1 it returns me : Warning: get_headers(http://www.radioblogclub.com/listen.php?u=..wLzRmb192cv8mZulmLzRmcvNWZy9Gb1NmcvBnch12b0FmL3d3d/Wolf%2520Eyes%2520-%2520The%2520driller.rbs&k=657ecb3231ac0b275497d4d6f00b61a1) [function.get-headers]: failed to open stream: HTTP request failed! in ********* on line 5. But when you type this URL in your browser, it works well, it redirects you to a file. (header(location)) Reproduce code: --------------- <?php $url = 'http://www.radioblogclub.com/listen.php?u=..wLzRmb192cv8mZulmLzRmcvNWZy9Gb1NmcvBnch12b0FmL3d3d/Wolf%2520Eyes%2520-%2520The%2520driller.rbs&k=657ecb3231ac0b275497d4d6f00b61a1'; print_r(get_headers($url)); ?> Expected result: ---------------- Fetches all the headers sent by the server in response to my HTTP request Actual result: -------------- Warning: get_headers(http://www.radioblogclub.com/listen.php?u=..wLzRmb192cv8mZulmLzRmcvNWZy9Gb1NmcvBnch12b0FmL3d3d/Wolf%2520Eyes%2520-%2520The%2520driller.rbs&k=657ecb3231ac0b275497d4d6f00b61a1) [function.get-headers]: failed to open stream: HTTP request failed! in ********* on line 5. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43749&edit=1