Req #63897 [Opn]: Custom http stream wrappers should be able to set $http_response_header

From: Date: Sun, 13 Jul 2014 23:59:46 +0000
Subject: Req #63897 [Opn]: Custom http stream wrappers should be able to set $http_response_header
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186605@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63897&edit=1 ID: 63897 User updated by: slangley at google dot com Reported by: slangley at google dot com Summary: Custom http stream wrappers should be able to set $http_response_header Status: Open Type: Feature/Change Request Package: Streams related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: The idea is to be able to replace the built-in http(s) stream wrappers with custom versions and have that work with *existing* applications, a heap of which already use $http_response_header. If you can't replicate the environment 100% with the custom wrapper then you're stuck. Previous Comments: ------------------------------------------------------------------------ [2014-07-13 13:02:03] datibbaw@php.net Can't you just use stream_get_meta_data() to get the same thing? ------------------------------------------------------------------------ [2013-01-04 00:57:08] slangley at google dot com Description: ------------ It is possible to write custom http/https stream wrappers in 'native' php, however it is impossible to get them to work correctly because of the magic variable $http_response_header. From http://php.net/manual/en/reserved.variables.httpresponseheader.php "$http_response_header will be created in the local scope." There is no way that I can determine that allows a PHP script to create this variable "in the local scope". Perhaps it would be possible to provide a method "set_http_response_header" that will allow this variable to be set from a script. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63897&edit=1

« previous php.bugs (#186605) next »