On 3.01.2024 14:41, Gina P. Banyard wrote:
Link: https://wiki.php.net/rfc/http-last-response-headers

Wrong function name in the subject (should be "response" not "request")

I don't think we need the clearing function. Do we?

I don't like that this is HTTP specific feature while we have other protocol wrappers. Here's a different approach. Use stream context with extended context parameters feature. Something like:

$context = stream_context_create();

$file = file_get_contents('http://www.example.com/', false, $context);

$headers = stream_context_get_params($context)['response_headers'];

Or something like that. I don't know.

While on this I found out that we already have stream_get_meta_data() and `wrapper_data` there. So, maybe we should/could make it more unified.

Maybe it should be mentioned in the RFC.

--
Aleksander Machniak
Kolab Groupware Developer        [https://kolab.org]
Roundcube Webmail Developer  [https://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to