Skip to content

Commit

Permalink
Merge branch 'release' into releases/2.0.1
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
	library/Zend/Version/Version.php
  • Loading branch information
weierophinney committed Aug 31, 2012
2 parents e42521d + bb50be2 commit bb2b6fe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Master: [![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?bran

This is the first maintenance release for the 2.0 series.

XX YYYY 2012
XX YYY 2012

### UPDATES IN 2.0.1

Expand Down
3 changes: 2 additions & 1 deletion library/Zend/Mail/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public function getHeaders()
{
if (null === $this->headers) {
$this->setHeaders(new Headers());
$this->headers->addHeaderLine('Date', date('r'));
$date = Header\Date::fromString('Date: ' . date('r'));
$this->headers->addHeader($date);
}
return $this->headers;
}
Expand Down
15 changes: 15 additions & 0 deletions tests/ZendTest/Mail/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,19 @@ public function testSettingNonAsciiEncodingForcesMimeEncodingOfSomeHeaders()
$expected = 'Subject: =?UTF-8?Q?This=20is=20a=20subject?=';
$this->assertContains($expected, $test);
}

/**
* @group ZF2-507
*/
public function testDefaultDateHeaderEncodingIsAlwaysAscii()
{
$this->message->setEncoding('utf-8');
$headers = $this->message->getHeaders();
$header = $headers->get('date');
$date = date('r');
$date = substr($date, 0, 16);
$test = $header->getFieldValue();
$test = substr($test, 0, 16);
$this->assertEquals($date, $test);
}
}

0 comments on commit bb2b6fe

Please sign in to comment.