From 29e50080ed22f53595575a98d4844ca05f68c19b Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 15 Feb 2017 13:00:24 +0100 Subject: [PATCH] Boundery should only be quoted in header --- CHANGELOG.md | 6 ++++++ src/MultipartStreamBuilder.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a0fe52..b6e20fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 0.1.5 - 2017-02-16 + +### Fixed + +- Performance improvements by avoid using `uniqid()`. + ## 0.1.5 - 2017-02-14 ### Fixed diff --git a/src/MultipartStreamBuilder.php b/src/MultipartStreamBuilder.php index 2bd603b..f8170b8 100644 --- a/src/MultipartStreamBuilder.php +++ b/src/MultipartStreamBuilder.php @@ -91,7 +91,7 @@ public function build() $streams = ''; foreach ($this->data as $data) { // Add start and headers - $streams .= "--\"{$this->getBoundary()}\"\r\n". + $streams .= "--{$this->getBoundary()}\r\n". $this->getHeaders($data['headers'])."\r\n"; // Convert the stream to string @@ -107,7 +107,7 @@ public function build() } // Append end - $streams .= "--\"{$this->getBoundary()}\"--\r\n"; + $streams .= "--{$this->getBoundary()}--\r\n"; return $this->streamFactory->createStream($streams); }