Bug #73425 [NEW]: get_headers() and default GET requests
| From: | spam2 at rhsoft dot net | Date: | Mon, 31 Oct 2016 05:34:45 +0000 |
| Subject: | Bug #73425 [NEW]: get_headers() and default GET requests | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-205086@lists.php.net to get a copy of this message | ||
From: spam2 at rhsoft dot net
Operating system:
PHP version: 7.0.12
Package: Performance problem
Bug Type: Bug
Bug description:get_headers() and default GET requests
Description:
------------
"By default get_headers uses a GET request" is not common sense
especially when you can only change that with
stream_context_set_default() other than file_get_contents which has a
context param
what's the point of that insane default while no server refuses HEAD
requests which are logical here by the functions name and behavior -
even a httpd with <Limit GET POST> won't refuse HEAD-requests, ours are
configzred that way
and no, please don't come with identical behavior and using stream
wrappers for everything, when soemone wants to do that he can just
achieve the same with file_get_contents which has in fact even a sane
context param
what someone expects froma function called get_headers() is, well, just
fetch the headers and not the body which is thrown away and if one
implements such a unexpetable default it's not enough that you need to
*scroll down* in teh documentation to find that out - common sense and
least surprise
--
Edit bug report at https://bugs.php.net/bug.php?id=73425&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73425&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73425&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73425&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73425&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73425&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73425&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73425&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73425&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73425&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73425&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73425&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73425&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73425&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73425&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73425&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73425&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73425&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73425&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73425&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73425&r=mysqlcfg