Bug->Req #73425 [Opn->Csd]: get_headers() and default GET requests

From: Date: Thu, 19 Aug 2021 13:26:25 +0000
Subject: Bug->Req #73425 [Opn->Csd]: get_headers() and default GET requests
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235954@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73425&edit=1 ID: 73425 Updated by: cmb@php.net Reported by: spam2 at rhsoft dot net Summary: get_headers() and default GET requests -Status: Open +Status: Closed -Type: Bug +Type: Feature/Change Request Package: Performance problem PHP Version: 7.0.12 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > what's the point of that insane default while no server refuses > HEAD requests Can you prove your claim? ;) Anyhow, this is not a bug, but rather a feature request, and because a $context parameter is available as of PHP 7.1.0, I consider it sufficiently fulfilled. I'm not claiming that GET is a particularly reasonable default here, but changing the long standing default would require the RFC process[1]; feel free to pursue it. [1] <https://wiki.php.net/rfc/howto> Previous Comments: ------------------------------------------------------------------------ [2018-03-25 21:23:43] cmb@php.net > it's not the only function which is lacking basic infos like > params over time and even wrong types are in general only fixed > for the english version Well, the English docs are the reference, so they are written, fixed and updated first. The respective translation teams are supposed to "sync with EN" as soon as time permits. It would be good if the translations pointed out whether they are outdated, but unfortunately PhD does not support that yet. Anyhow, many translations could need some help (the German translation certainly does!), so consider to submit patches via <https://edit.php.net/>. FTR: the $context parameter has been documented[1], and the German translation has been synced[2]. [1] <http://svn.php.net/viewvc?view=revision&revision=344567> [2] <http://svn.php.net/viewvc?view=revision&revision=344568> ------------------------------------------------------------------------ [2018-03-25 17:13:29] spam2 at rhsoft dot net cool, thanks whoever is adapting the manual shoul also think about the other languages and *at least* adopt the params and types on top (it's not the only function which is lacking basic infos like params over time and even wrong types are in general only fixed for the english version) http://php.net/manual/en/function.get-headers.php http://php.net/manual/de/function.get-headers.php ------------------------------------------------------------------------ [2018-03-25 16:59:58] cmb@php.net FWIW, as of PHP 7.1.0, get_headers() supports an optional $context argument. ------------------------------------------------------------------------ [2016-10-31 05:34:39] spam2 at rhsoft dot net 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 this bug report at https://bugs.php.net/bug.php?id=73425&edit=1

« previous php.bugs (#235954) next »