Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50009 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70677 invoked from network); 30 Oct 2010 13:44:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Oct 2010 13:44:11 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:57684] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/B4-24227-6212CCC4 for ; Sat, 30 Oct 2010 09:44:07 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 7DDC77000488; Sat, 30 Oct 2010 14:44:03 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id WBcIqcI0cwpH; Sat, 30 Oct 2010 14:44:03 +0100 (WEST) Received: from mail2.ist.utl.pt (mail2.ist.utl.pt [IPv6:2001:690:2100:1::c]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 2449B70003F3; Sat, 30 Oct 2010 14:44:02 +0100 (WEST) Received: from [93.108.42.96] (96.42.108.93.rev.vodafone.pt [93.108.42.96]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 3CA9A200738D; Sat, 30 Oct 2010 14:43:59 +0100 (WEST) Reply-to: "Gustavo Lopes" To: Pierre Joye Cc: PHP internals Date: Sat, 30 Oct 2010 14:43:36 +0100 Message-ID: X-Mailer: EPOC Email Version 2.10 MIME-Version: 1.0 Content-Language: i-default Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: RE: [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: glopes@nebm.ist.utl.pt ("Gustavo Lopes") 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 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=C3=A9 dos Santos Lopes : > cataphract Fri, 29 Oct 2010 15:29:15 = +0000 > > Revision: = http://svn.php.net/viewvc?view=3Drevision&revision=3D304985 > > 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, --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org --=20 PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php