The From: header is actually valid in http (see section 14.21 of RFC 2616) and is appropriately used in PHP, as it is.
Yes, this should arguably be a context option for http/ftp wrappers, though one could argue it's a global setting that happens to reflect on those wrappers. In any case, that is a matter outside the realm of bug fixing; I merely made the ini setting that currently exists work correctly. Sorry for the top posting. -original message- Subject: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/file.c branches/PHP_5_3/ext/standard/file.h branches/PHP_5_3/ext/standard/ftp_fopen_wrapper.c branches/PHP_5_3/ext/standard/http_fopen_wrapper.c branches/PHP_5_3/ext From: Pierre Joye <pierre....@gmail.com> Date: 2010-10-30 12:27 hi, Removing the From header for non ftp request sounds good as it is invalid. However I don't see the need to introduce a global ini setting. This kind of information are protocol specific and should be defined either manually in a context (as shown in the report reproduce code) or as a context option, for a given protocol. It is also wrong from a design point of view to add protocol options in this layer (the agent info was a mistake back then already). I would suggest to apply Richard's patch instead and revert this change. If we need to add more options to one protocol or another, then let do it, but in the protocol implementation. Thanks for your work! Cheers, 2010/10/29 Gustavo André dos Santos Lopes <cataphr...@php.net>: > cataphract Fri, 29 Oct 2010 15:29:15 +0000 > > Revision: http://svn.php.net/viewvc?view=revision&revision=304985 > > Log: > - Fixed bug #53198 (changing INI setting "from" with ini_set did not have any > effect) > #Made "from" a proper INI setting and bound it to a global variable. > #Previously, it was simply read from the hash table with the parsed ini file > #by using cfg_get_string (I wonder why this mechanism still exists...) > > Bug: http://bugs.php.net/53198 (Assigned) "From:" header sent on http request > when using stream_context. > > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > U php/php-src/branches/PHP_5_3/ext/standard/file.c > U php/php-src/branches/PHP_5_3/ext/standard/file.h > U php/php-src/branches/PHP_5_3/ext/standard/ftp_fopen_wrapper.c > U php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c > A php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug53198.phpt > U php/php-src/trunk/ext/standard/file.c > U php/php-src/trunk/ext/standard/file.h > U php/php-src/trunk/ext/standard/ftp_fopen_wrapper.c > U php/php-src/trunk/ext/standard/http_fopen_wrapper.c > A php/php-src/trunk/ext/standard/tests/http/bug53198.phpt Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php