Permalink
Browse files

Fix bug in header parsing of HTTP response

  • Loading branch information...
1 parent 16fcca8 commit 85f9ff6da5808578029eaba7039b85d7d76aaa66 @beberlei committed May 21, 2012
@@ -35,7 +35,9 @@ public function __construct($code, $body, array $headers)
{
$this->code = $code;
$this->body = $body;
- $this->headers = $headers;
+ foreach ($headers as $header => $value) {
+ $this->headers[strtolower($header)] = $value;
+ }
}
/**
@@ -74,6 +76,8 @@ public function getContent()
*/
public function getHeader($name)
{
+ $name = strtolower($name);
+
if ( ! isset($this->headers[$name])) {
return null;
}
@@ -362,9 +362,9 @@ public function testSetBlobProperties()
$storageClient->putBlob($containerName, 'images/WindowsAzure.gif', self::$path . 'WindowsAzure.gif');
$storageClient->setBlobProperties($containerName, 'images/WindowsAzure.gif', null, array(
- 'x-ms-blob-content-language' => 'nl-BE',
- 'x-ms-blob-content-type' => 'image/gif'
- ));
+ 'x-ms-blob-content-language' => 'nl-BE',
+ 'x-ms-blob-content-type' => 'image/gif'
+ ));
$blobInstance = $storageClient->getBlobInstance($containerName, 'images/WindowsAzure.gif');

0 comments on commit 85f9ff6

Please sign in to comment.