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(http/file_server): svg media type #718

Merged
merged 1 commit into from
Feb 10, 2021
Merged

Conversation

fonsp
Copy link
Contributor

@fonsp fonsp commented Feb 10, 2021

If you use file_server to host a site with local svg files...

<img src="./image.svg">

...then the image does not show...
image
...because the browser assumes the XML media type, not the svg+xml type.

This PR adds the correct Content-Type header to svg files, which fixes the problem.


(I also checked png and jpg, they work already because the browser can deduce the media type from the file headers)

@CLAassistant
Copy link

CLAassistant commented Feb 10, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

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

LGTM

@kitsonk kitsonk merged commit 2b14db3 into denoland:main Feb 10, 2021
@fonsp fonsp deleted the patch-1 branch February 11, 2021 08:56
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.

None yet

3 participants