Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix content type determination for blob from fetch #2109

Merged
merged 1 commit into from
May 10, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented May 10, 2024

Using a compatibility flag, selects the correct content type for a blob from the fetch-provided content-type header(s) as defined by the fetch spec: https://fetch.spec.whatwg.org/#concept-header-extract-mime-type

Sadly it's potentially breaking change so the compat flag is needed.

Fixes: #2099

Goal: Web standards compliance, bug fix

@jasnell jasnell requested review from a team as code owners May 10, 2024 01:50
@jasnell jasnell requested review from dom96, jp4a50 and fhanau May 10, 2024 01:50
@jasnell jasnell added bug Something isn't working spec-compliance api labels May 10, 2024
Copy link
Collaborator

@dom96 dom96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good overall but have one question.

src/workerd/util/mimetype.c++ Show resolved Hide resolved
@jasnell jasnell force-pushed the jsnell/fix-fetch-blob-content-type branch from f6210b3 to 5d79de3 Compare May 10, 2024 18:29
Using a compatibility flag, selects the correct content type for a blob
from the fetch-provided content-type header(s) as defined by the fetch
spec: https://fetch.spec.whatwg.org/#concept-header-extract-mime-type

Sadly it's potentially breaking change so the compat flag is needed.

Fixes: #2099
@jasnell jasnell force-pushed the jsnell/fix-fetch-blob-content-type branch from 5d79de3 to a454306 Compare May 10, 2024 19:39
@jasnell jasnell merged commit c2a9157 into main May 10, 2024
10 checks passed
@jasnell jasnell deleted the jsnell/fix-fetch-blob-content-type branch May 10, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api bug Something isn't working spec-compliance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug Report — Body.prototype.blob() incorrectly extracting content-type
2 participants