cvs: pear /Mail Mail.php

From: Date: Sun, 23 May 2004 23:07:38 +0000
Subject: cvs: pear /Mail Mail.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-19782@lists.php.net to get a copy of this message
jon Sun May 23 19:07:38 2004 EDT Modified files: /pear/Mail Mail.php Log: Perform case-insensitive comparisons against header keys. Submitted By: Colin Viebrock http://cvs.php.net/diff.php/pear/Mail/Mail.php?r1=1.6&r2=1.7&ty=u Index: pear/Mail/Mail.php diff -u pear/Mail/Mail.php:1.6 pear/Mail/Mail.php:1.7 --- pear/Mail/Mail.php:1.6 Thu Jun 26 03:05:36 2003 +++ pear/Mail/Mail.php Sun May 23 19:07:38 2004 @@ -16,7 +16,7 @@ // | Author: Chuck Hagenbuch <chuck@horde.org> | // +----------------------------------------------------------------------+ // -// $Id: Mail.php,v 1.6 2003/06/26 07:05:36 jon Exp $ +// $Id: Mail.php,v 1.7 2004/05/23 23:07:38 jon Exp $ require_once 'PEAR.php'; @@ -26,7 +26,7 @@ * useful in multiple mailer backends. * * @access public - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @package Mail */ class Mail @@ -128,7 +128,7 @@ $from = null; foreach ($headers as $key => $value) { - if ($key === 'From') { + if (strcasecmp($key, 'From') === 0) { include_once 'Mail/RFC822.php'; $addresses = Mail_RFC822::parseAddressList($value, 'localhost', @@ -141,7 +141,7 @@ } $lines[] = $key . ': ' . $value; - } elseif ($key === 'Received') { + } elseif (strcasecmp($key, 'Received') === 0) { // Put Received: headers at the top. Spam detectors often // flag messages with Received: headers after the Subject: // as spam.

« previous php.pear.cvs (#19782) next »