From:             [EMAIL PROTECTED]
Operating system: 
PHP version:      5CVS-2005-08-10 (dev)
PHP Bug Type:     Feature/Change Request
Bug description:  get_headers() returns false and throws warning on 404

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


-- 
Edit bug report at http://bugs.php.net/?id=34059&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34059&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34059&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34059&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34059&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34059&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34059&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34059&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34059&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34059&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34059&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34059&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34059&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34059&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34059&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34059&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34059&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34059&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34059&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34059&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34059&r=mysqlcfg

Reply via email to