asual / lesscss-servlet

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

ResourceServlet : lastmodified check #9

Closed sgunapu closed 13 years ago

sgunapu commented 13 years ago

Should this be ifModifiedSince/milliseconds >= lastModified/milliseconds?

if (ifModifiedSince != 0 && ifModifiedSince/milliseconds == lastModified/milliseconds) { logger.debug("Return with SC_NOT_MODIFIED, since " + ifModifiedSince + " == " + lastModified); response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); return; }

asual commented 13 years ago

In general your proposal is correct but how are you going to end up in a case that requires such a change?

sgunapu commented 13 years ago

I was implementing a resource concatenation servlet, which would send the most recent last modified date of all the resources to check individual resources for a 302.

asual commented 13 years ago

There is concatenation support already built in the project. It's handled primarily by the ResourcePackage class. Do you need help how to use it?