asual / lesscss-servlet

LESS Servlet - Runtime handling and optimization of less.js resources
http://www.asual.com/lesscss
Apache License 2.0
56 stars 15 forks source link

A small bugg in cache-control #21

Closed Jonas-Kalvesten closed 11 years ago

Jonas-Kalvesten commented 11 years ago

Hi, and thanks for a nice library.

I found a bug in cache-control. If the less file has'nt been modified the servlet returns with: response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);.

What happens in IE browsers is that no Cache-Control is set on that response and its up to the browser how long it will cache it before making a new request against the servlet. Need to again set: response.setHeader("Cache-control", "max-age=" + maxAge);

I've handled it by overriding the service function and always setting the CacheControl header on response.

Regards

Jonas Kälvesten