Permalink
Browse files

Fix for InvalidArgumentException 'Missing header delimiter' when the …

…part of the multipart response doesn't have a space at the end. Guzzle expects to split the response into a minimum of 2 parts, header and body. (#220)
  • Loading branch information...
ChristopherCarranza authored and troydavisson committed Dec 20, 2018
1 parent ec2ce8c commit d897f4b262853a13ae8ee4fa678a3eb76b7e2150
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Parsers/GetObject/Multiple.php
@@ -49,7 +49,7 @@ public function parse(PHRETSResponse $response)
// go through each part of the multipart message
foreach ($multi_parts as $part) {
// get Guzzle to parse this multipart section as if it's a whole HTTP message
$parts = \GuzzleHttp\Psr7\parse_response("HTTP/1.1 200 OK\r\n" . $part);
$parts = \GuzzleHttp\Psr7\parse_response("HTTP/1.1 200 OK\r\n" . $part . "\r\n");
// now throw this single faked message through the Single GetObject response parser
$single = new PHRETSResponse(new Response($parts->getStatusCode(), $parts->getHeaders(), (string)$parts->getBody()));

0 comments on commit d897f4b

Please sign in to comment.