Bug #53198 [Asn->Csd]: "From:" header sent on http request when using stream_context.

From: Date: Wed, 24 Nov 2010 11:02:25 +0000
Subject: Bug #53198 [Asn->Csd]: "From:" header sent on http request when using stream_context.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156365@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53198&edit=1

 ID:                 53198
 Updated by:         cataphract@php.net
 Reported by:        RQuadling at GMail dot com
 Summary:            "From:" header sent on http request when using
                     stream_context.
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Streams related
 Operating System:   Windows XP SP3
 PHP Version:        5.3SVN-2010-10-29 (SVN)
 Assigned To:        cataphract
 Block user comment: N
 Private report:     N

 New Comment:

Implementation for 5.3 changed so it doesn't break binary backwards
compatibility.


Previous Comments:
------------------------------------------------------------------------
[2010-10-30 14:02:31] pajoye@php.net

Re open it, see my comment here: http://news.php.net/php.internals/50008

------------------------------------------------------------------------
[2010-10-29 17:38:07] cataphract@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------
[2010-10-29 17:37:57] cataphract@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=304986
Log: - Documented that the INI setting "from" is used to
populate the From
  header in connections with the http wrapper.
- Addresses bug #53198.

------------------------------------------------------------------------
[2010-10-29 17:29:17] cataphract@php.net

Automatic comment from SVN on behalf of cataphract
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...)

------------------------------------------------------------------------
[2010-10-29 10:24:21] RQuadling at GMail dot com

Using ini_set('from', 'junk@junk.com'); has no effect on the output in 
WireShark.

Using ...


<?php
ini_set('from', 'noone@home.com');
file_get_contents(
	'http://www.php.net/Test1',
	False,
	...

shows 


GET /Test1 HTTP/1.0
From: AutomatecTasks@Bandvulc.co.uk
Host: www.php.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/534.10 
(KHTML, like Gecko) Chrome/8.0.552.18 Safari/534.10

and the response includes ...

Location: http://uk3.php.net/Test1

and that request also includes the From: header.

So, if 'from' is kept as an option, the documentation is out as it is
not a 
PHP_INI_ALL entry.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=53198


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53198&edit=1


Thread (6 messages)

« previous php.bugs (#156365) next »