Closed brycied00d closed 4 years ago
what's the status of this issue?
@Paxa It's fixed in the pull #15 , but after that it's overwritten by this commit
https://github.com/fog/fog-backblaze/commit/83adba05e3a0ee5f91b5ff7c8cd7049700cbbb69
I've created the new pull #28 to fix it (copied from #15).
Please help us to check it again. Thank you!
In debugging why Backblaze wasn't honouring the
content_disposition
I was passing toput_object
I noticed that itsHash#merge
is taking in a Hash that's indexed by symbols (the{'foo': 'bar'}
syntax) and merging in a hash that's indexed by strings ({'foo' => 'bar'}
) and as a result, user-definedContent-Type
doesn't override the defaultb2/x-auto
This behaviour can be seen in the
logger.debug
output from the request body where there's both:"Content-Type"
and"Content-Type"
, then look at the responsecontentType
ofapplication-octet
stream which indicates thatb2/x-auto
had been used. You will also notice:Authorization
and"Authorization"
headers which is the result of the same mis-match between the use of the symbol:Authorization
input_object
and the use of a string Hash index inb2_command
. (Formatting is my own to make the lines easier to read)https://github.com/fog/fog-backblaze/blob/f45d37606e937bdef2a5d59a1364a57a0f1f4c42/lib/fog/backblaze/storage/real.rb#L214-L219