Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release' into releases/2.0.1

Conflicts:
	README.md
	library/Zend/Version/Version.php
  • Loading branch information...
commit bb2b6febb2cb9fd0611209b873de97605f08eabc 2 parents e42521d + bb50be2
@weierophinney weierophinney authored
View
2  README.md
@@ -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
View
3  library/Zend/Mail/Message.php
@@ -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;
}
View
15 tests/ZendTest/Mail/MessageTest.php
@@ -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);
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.