Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Don't treat any empty lines as headers
Browse files Browse the repository at this point in the history
Fix #191
  • Loading branch information
spaze authored and vinjiang committed Aug 15, 2019
1 parent ccf40ab commit bed9d2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azure-storage-table/src/Table/Models/BatchResult.php
Expand Up @@ -76,12 +76,12 @@ private static function _constructResponses($body, IMimeReaderWriter $mimeSerial

$headers = array();
$j = 1;
do {
while (Resources::EMPTY_STRING != $lines[$j]) {
$headerLine = $lines[$j++];
$headerTokens = explode(':', $headerLine);
$headers[trim($headerTokens[0])] =
isset($headerTokens[1]) ? trim($headerTokens[1]) : null;
} while (Resources::EMPTY_STRING != $headerLine);
}
$response->headers = $headers;
$response->body = implode(PHP_EOL, array_slice($lines, $j));
$responses[] = $response;
Expand Down

0 comments on commit bed9d2a

Please sign in to comment.