propagate from branch 'i2p.i2p' (head 36bd43007b45f4b59b1dc14a2cb02b06c9e7fa84)

to branch 'i2p.i2p.zzz.dhtsnark' (head 2960be09b366cb629d254d72f0654ff9ecc0133b)
This commit is contained in:
zzz
2010-12-31 16:28:53 +00:00
29 changed files with 1162 additions and 898 deletions

View File

@ -107,6 +107,17 @@ public class I2PSnarkServlet extends Default {
return _resourceBase.addPath(pathInContext);
}
/**
* Tell the browser to cache the icons
* @since 0.8.3
*/
@Override
public void handleGet(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource, boolean endsWithSlash) throws ServletException, IOException {
if (resource.getName().startsWith("jar:file:"))
response.setHeader("Cache-Control", "max-age=86400"); // cache for a day
super.handleGet(request, response, pathInContext, resource, endsWithSlash);
}
/**
* Some parts modified from:
* <pre>