NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP 5.3 add_x_header Broken

Daniel Convissor danielc at analysisandsolutions.com
Thu May 21 18:42:28 EDT 2009


Hola:

On Thu, May 21, 2009 at 06:23:43PM -0400, Hans Zaunere wrote:
> 
> However, when the X-PHP-Originating-Script header is added, it's prefixed
> with a \r\n.  This thus breaks some email clients, especially when sending
> from a Unix host where all the other headers are separated by only a \n.

Well, last I looked, the mail format RFC says the headers are supposed to 
be \r\n.  But it sounds like the rest of the headers generated by PHP are 
using \n.  Fun.

Let's take a look at mail.c...
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/mail.c?view=log

Yep, the rest of the headers use \n.

Make a patch to line 244 changing \r\n to \n (Or change them all to \r\n 
like the RFC says. :) and open up a bug report.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list