skeeto / impatient-mode

Impatient html mode. See your changes in the browser as you type
215 stars 19 forks source link

Send correct MIME type instead of text/plain #2

Closed pkkm closed 9 years ago

pkkm commented 9 years ago

When another file (e.g. a CSS stylesheet) is referenced from an HTML file, impatient-mode serves it with a hardcoded Content-Type: text/plain. This causes problems in browsers; for example, Firefox ignores CSS files that aren't sent as text/css.

This commit makes impatient-mode determine the MIME type to send based on the extension of the requested file.

skeeto commented 9 years ago

Thanks! I believe this solves #18 over in @netguy204's repository. I couldn't figure out in which situations the MIME type was wrong. I rebased your patch as 5f6205f.

Note that his repo is the canonical one, so you won't see the change reflected in MELPA until he gets this patch. I'll forward it on to him.

pkkm commented 9 years ago

Thanks!