-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Attach correct Content-Type to HTTP header #4555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - no need to add a test.
Does this mean that someone else will add it for me? Tests are useful against unwanted regression. |
I suppose a test is useful. I was thinking that this is just an example program so it doesn't matter that much, but it should indeed have a test. |
@ry I am trying to compile Deno (so far, without success). |
@ry The time it takes to clone all git submodules is too long. I guess you could just merge this then? |
@KSXGitHub I added a test - please take a look. |
@ry I tried using deno to run the script directly: (zsh) deno run --allow-all --reload=https://raw.githubusercontent.com/KSXGitHub/deno/file-server-content-type/std/http/file_server.ts https://raw.githubusercontent.com/KSXGitHub/deno/file-server-content-type/std/http/file_server.ts Download https://raw.githubusercontent.com/KSXGitHub/deno/file-server-content-type/std/http/file_server.ts Compile https://raw.githubusercontent.com/KSXGitHub/deno/file-server-content-type/std/http/file_server.ts error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. ► https://raw.githubusercontent.com/KSXGitHub/deno/file-server-content-type/std/http/file_server.ts:301:18 301 function main(): Promise<void> { ~~~~~~~~~~~~~ |
@ry It works great! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks @KSXGitHub !
Fix #4553.
Test
I did not add any test. My attempt to use
deno test
to runfile_server_test.ts
has not been successful.