http-rs / http-rs/surf

Incorrect Content-Type value returned

Open
#280 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
1.5k
Forks
128
PR merge metrics
No merged PRs in 30d

Description

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.g `Content-Type: image/gif` for [this gif](https://assets.super.so/blog.seekwell.io/images/aaf09519-3f8a-42f9-b794-43dc0d322cad.gif) which is an image from [this article](https://blog.seekwell.io/gpt3).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the request for the linked Notion-hosted GIF and compare Surf's response headers with the curl result, especially Content-Type. Trace the response-header handling used by Surf for this URL; done means the image response reports Content-Type: image/gif rather than application/json.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.