Open hipstermojo opened 3 years ago
Can you share one of these files? That would indicate it has incorrect magic bytes somehow.
That is the gif linked to in the first comment.
That would indicate it has incorrect magic bytes somehow.
Does it mean that surf relies on magic bytes first, then the content-type header, to determine a file type?
Oh sorry, on remote read it should be content-type first.
It seems that when doing client decode it is not actually set properly.
Though, I would expect it to be application/octet-stream
, since that's what Body::from_reader
would set it to.
From deepest outwards to Surf:
I suspect this code should probably live in async-h1.
Surf seems to return a
Content-Type: application/json
header when fetching images from webpages built with Notion. I tried making the same requests over curl and it logged the correct headers e.gContent-Type: image/gif
for this gif which is an image from this article.