NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP 5.3 add_x_header Broken

Hans Zaunere lists at zaunere.com
Fri May 22 17:33:31 EDT 2009


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

Yeah, as I suspected - I'll submit a bug.

H





More information about the talk mailing list