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

CSS content generated by less/stylus preprocessor will serve content-type: application/javascript #843

Closed
chriswong opened this issue Nov 30, 2013 · 3 comments

Comments

@chriswong
Copy link

  1. the css content was process with preprocessor, such as karma-less-preprocessor
  2. karma/lib/preprocessor takes '.js' as suffix of file.contentPath in line 63.
  3. karma/lib/middleware/common line 39, mime.lookup with file.contentPath
  4. as the result of above, a requestUrl like /base/css/a.css, the content-type will response as 'application/javascript'

i'll send a pull request to fix it.

@vojtajina
Copy link
Contributor

Yep, we should use file.path (which is the path that the file is being served under).

@vojtajina
Copy link
Contributor

I actually already changed that in my local branch (while working on caching of the preprocessed files to save FS access).

@chriswong
Copy link
Author

ok, i'm waiting for ur latest release on npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants