|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-23 16:05 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
Description: ------------ I feel like the current behaviur of get_headers() is wrong, i.e. it doesnt give me the headers on 404 errors etc. Would like to get the header, even thou its just an error header. Reproduce code: --------------- php -r 'print_r(get_headers("http://example.com/non"));' Expected result: ---------------- Array ( [0] => HTTP/1.1 404 Not Found [1] => Date: Wed, 10 Aug 2005 00:47:07 GMT [2] => Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) [3] => Transfer-Encoding: chunked [4] => Connection: close [5] => Content-Type: text/html; charset=iso-8859-1 ) Actual result: -------------- Warning: get_headers(http://example.com/non): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in Command line code on line 1