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

Add content-type header in fileserver #47

Merged
merged 5 commits into from
Dec 31, 2018
Merged

Add content-type header in fileserver #47

merged 5 commits into from
Dec 31, 2018

Conversation

bartlomieju
Copy link
Member

Closes #43.

I took list of common mime types from MDN and extended it with .yml and .yaml formats so I could reuse already existing tests.

If extension if not recognized it falls back to application/octet-stream which causes file to be downloaded by default. IMHO we could extended list more and provide it as separate module, then serve more files as plaintext instead of octet stream.

net/file_server.ts Outdated Show resolved Hide resolved
net/file_server.ts Outdated Show resolved Hide resolved
net/file_server.ts Outdated Show resolved Hide resolved
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - thanks!

@ry ry merged commit ab27371 into denoland:master Dec 31, 2018
@bartlomieju bartlomieju deleted the file_server_ct branch December 31, 2018 09:46
fancyplants pushed a commit to fancyplants/deno_std that referenced this pull request Jan 9, 2019
ry pushed a commit to ry/deno that referenced this pull request Oct 9, 2019
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.

4 participants