sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 343 forks source link

If the filename has ".min.js" harpjs thinks it's a webpage #102

Closed kevinsimper closed 11 years ago

kevinsimper commented 11 years ago

If your minified javascript contains .min.js in the filename, harp thinks is it something else than a js file, and makes it a webpage.

image

I think this needs a pretty quick fix because it is quite normal to have a javascript file which is name ".min.js".

kevinsimper commented 11 years ago

The file were moved and therefore did not exist. My fault, but got confused but Harp ways to handle the not existing file when the content-type is not text/html.

It should have returned a 404, that it did not exist, instead of a HTML error page.

kennethormandy commented 11 years ago

Thanks Kevin, sorry for the confusion. You’re right about text/html being incorrect. This is probably related to #88, 404 errors for CSS files are getting served with the incorrect MIME type as well.

kennethormandy commented 11 years ago

Fixed as of Harp v0.9.4. :mountain_cableway:

megyeriz commented 10 years ago

On the other side if I have a file contains *.src.css (using Less) string harp recognize it application/x-wais-source mime type. I'm using 0.12.1.

kennethormandy commented 10 years ago

@megyeriz Hey, thanks for commenting. Would you mind elaborate on this? What is your expected outcome when naming a file .src.css?