dkataskin / erlazure

Windows Azure Erlang bindings
BSD 3-Clause "New" or "Revised" License
35 stars 54 forks source link

Invalid HTTP header x-ms-blob-type #12

Closed jakubgarfield closed 9 years ago

jakubgarfield commented 9 years ago

When trying to create a block blob I ran into the following issue from my Elixir app.

** (exit) bad return value: "<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.\nRequestId:41797b79-0001-0002-0d7d-93ecbe000000\nTime:2015-05-21T04:18:52.3985127Z</Message><HeaderName>x-ms-blob-type</HeaderName><HeaderValue>block_blob</HeaderValue></Error>"

I trace the error down to the call at

https://github.com/dkataskin/erlazure/blob/d27e076b81d35b3dd39122d1b4aaa6f24df15e26/src/erlazure_blob.erl#L196

where erlang:atom_to_list on block_blob returns block_blob instead of BlockBlob. I was able to quick fix the issue for my use case https://github.com/jakubgarfield/erlazure/commit/edfb1e58400966ca7be7e9178a7fd9bc22d6d7f8 but my Erlang knowledge prevents me from fixing it properly.

dkataskin commented 9 years ago

Thanks, will look into it today.

dkataskin commented 9 years ago

Should be working now.

jakubgarfield commented 9 years ago

Awesome, it works without any problems now. Thank you.