Bug #66535 [Opn->Csd]: X-PHP-Originating-Script adds newline if no custom headers are given

From: Date: Fri, 28 Feb 2014 14:46:59 +0000
Subject: Bug #66535 [Opn->Csd]: X-PHP-Originating-Script adds newline if no custom headers are given
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184473@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66535&edit=1

 ID:                 66535
 Updated by:         datibbaw@php.net
 Reported by:        datibbaw@php.net
 Summary:            X-PHP-Originating-Script adds newline if no custom
                     headers are given
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            *Mail Related
 Operating System:   N/A
 PHP Version:        5.5.8
-Assigned To:        
+Assigned To:        datibbaw
 Block user comment: N
 Private report:     N

 New Comment:

The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2014-01-21 17:16:20] datibbaw@php.net

Description:
------------
A newline is added to the mail headers when mail.add_x_header is used and no other headers are
passed to mail().

The scenario in which custom headers are used was already fixed in #48620, back in 2009; this is
different.

Test script:
---------------
assert(ini_get('mail.add_x_header') == 1);
mail("me@example.com", "Test", "A line of text.");

Expected result:
----------------
From: me@mymachine.local (Me)
X-PHP-Originating-Script: 501:-

A line of text.

Actual result:
--------------
From: me@mymachine.local (Me)
X-PHP-Originating-Script: 501:-


A line of text.


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



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


Thread (2 messages)

« previous php.bugs (#184473) next »