You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using less.js and including a file using a <link> element with a plugin, the Accept header that's sent when GETting the plugin is text/css. This causes IIS to return 406 Not Acceptable.
Description
When using less.js and including a file using a
<link>
element with a plugin, theAccept
header that's sent when GETting the plugin istext/css
. This causes IIS to return406 Not Acceptable
.Steps to repro:
You can visit https://lessbug.azurewebsites.net/ where I put together a project showing the issue. The code of this project is on GitHub.
There are 3 files involved.
index.html
:test.less
:less-plugin.js
:This, when hosted on IIS, returns this error:
When inspecting the network logs, you can see that the request headers contain
Accept: text/css
IIS, as it knows the content type for a javascript file is
application/javascript
, returns a406 Not Acceptable
HTTP error.I'm creating a PR with my proposed solution.
The text was updated successfully, but these errors were encountered: