aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-27 14:56:37 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-27 15:07:51 +0200
commite2c9276de78cb08cd614f8072a5e9afa03c973bd (patch)
tree70de97a64cd9b7c19d31c486405d4f69c2405cc9
parent4ae44c4d0f09fe9d1aee471764eb7743356f4b3e (diff)
downloadMail-e2c9276de78cb08cd614f8072a5e9afa03c973bd.zip
Mail-e2c9276de78cb08cd614f8072a5e9afa03c973bd.tar.gz
Mail-e2c9276de78cb08cd614f8072a5e9afa03c973bd.tar.bz2
Add quotes around boundary definition.
-rw-r--r--Content/Message.php12
-rw-r--r--Test/Unit/Content/Alternative.php2
-rw-r--r--Test/Unit/Content/Message.php2
-rw-r--r--Test/Unit/Content/Related.php2
4 files changed, 11 insertions, 7 deletions
diff --git a/Content/Message.php b/Content/Message.php
index 6842331..0c4d527 100644
--- a/Content/Message.php
+++ b/Content/Message.php
@@ -116,10 +116,14 @@ class Message extends Content
}
if (1 < count($content)) {
- $boundary = '__bndry-' .
- md5(static::BOUNDARY . microtime(true));
- $frontier = '--' . $boundary;
- $this['content-type'] = $this['content-type'] . '; boundary=' . $boundary;
+ $boundary =
+ '__bndry-' .
+ md5(static::BOUNDARY . microtime(true));
+ $frontier = '--' . $boundary;
+
+ $this['content-type'] =
+ $this['content-type'] . '; ' .
+ 'boundary="' . $boundary . '"';
$message = static::formatHeaders($this->getHeaders()) . CRLF;
diff --git a/Test/Unit/Content/Alternative.php b/Test/Unit/Content/Alternative.php
index b043413..87b5966 100644
--- a/Test/Unit/Content/Alternative.php
+++ b/Test/Unit/Content/Alternative.php
@@ -89,7 +89,7 @@ class Alternative extends Test\Unit\Suite
->then
->string($result)
->isEqualTo(
- 'content-type: multipart/alternative; boundary=__bndry-3d469222fa3ab341c0d491b98a8aa315' . CRLF .
+ 'content-type: multipart/alternative; boundary="__bndry-3d469222fa3ab341c0d491b98a8aa315"' . CRLF .
CRLF .
// Content 1.
diff --git a/Test/Unit/Content/Message.php b/Test/Unit/Content/Message.php
index dd4712e..6cddfee 100644
--- a/Test/Unit/Content/Message.php
+++ b/Test/Unit/Content/Message.php
@@ -249,7 +249,7 @@ class Message extends Test\Unit\Suite
->then
->string($result)
->isEqualTo(
- 'content-type: multipart/mixed; boundary=__bndry-889c9d2eee9fc547c03ab71ac5c93db3' . CRLF .
+ 'content-type: multipart/mixed; boundary="__bndry-889c9d2eee9fc547c03ab71ac5c93db3"' . CRLF .
'date: Thu, 01 Jan 1970 01:00:42 +0100' . CRLF .
CRLF .
diff --git a/Test/Unit/Content/Related.php b/Test/Unit/Content/Related.php
index bb2372f..679c8ec 100644
--- a/Test/Unit/Content/Related.php
+++ b/Test/Unit/Content/Related.php
@@ -89,7 +89,7 @@ class Related extends Test\Unit\Suite
->then
->string($result)
->isEqualTo(
- 'content-type: multipart/related; boundary=__bndry-4200f97b27dcfb5905f0c9c7b680920d' . CRLF .
+ 'content-type: multipart/related; boundary="__bndry-4200f97b27dcfb5905f0c9c7b680920d"' . CRLF .
CRLF .
// Related 1.