I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 95cf3065 authored by zzz's avatar zzz
Browse files

* i2psnark: Send cache directive for in-war icons

parent a18197db
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,17 @@ public class I2PSnarkServlet extends Default { ...@@ -99,6 +99,17 @@ public class I2PSnarkServlet extends Default {
return _resourceBase.addPath(pathInContext); 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: * Some parts modified from:
* <pre> * <pre>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment