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

Don't add charset to certain file types #357

Merged
merged 2 commits into from
Feb 6, 2019

Conversation

gpoitch
Copy link
Member

@gpoitch gpoitch commented Jan 7, 2019

What kind of change does this PR introduce?
Bugfix. #350
Less aggressive alternative to PR #351

Did you add tests for your changes?
Yes

Summary
Creates a variable to special case more file types that should not automatically have a charset added to their content-type header. This was already the case for wasm and this also adds usdz.

Does this PR introduce a breaking change?
No

Other information
I originally attempted to look up each filetype in mime-db (#351) to determine if it should receive a charset. However, that only looks up if the file type has a "default" charset defined by the spec which is not necessarily good for friendly out-of-the box support and could have introduced breaking changes.

@codecov
Copy link

codecov bot commented Jan 7, 2019

Codecov Report

Merging #357 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
+ Coverage   96.82%   96.83%   +0.01%     
==========================================
  Files           7        7              
  Lines         252      253       +1     
==========================================
+ Hits          244      245       +1     
  Misses          8        8
Impacted Files Coverage Δ
lib/middleware.js 94.44% <100%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e8ac82...4f7aa0a. Read the comment docs.

@codecov
Copy link

codecov bot commented Jan 7, 2019

Codecov Report

Merging #357 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
+ Coverage   96.83%   96.85%   +0.01%     
==========================================
  Files           7        7              
  Lines         253      254       +1     
==========================================
+ Hits          245      246       +1     
  Misses          8        8
Impacted Files Coverage Δ
lib/middleware.js 94.44% <100%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c64a2c1...15e3079. Read the comment docs.

@alexander-akait
Copy link
Member

Previous PR was right, just need major release for this, but this we can merge as bugfix, please reopen old PR for future major release, thanks

@alexander-akait alexander-akait merged commit b135b3d into webpack:master Feb 6, 2019
@alexander-akait
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants