From 96cf1d60c2006cedcf7df5618566bd994b7d24bb Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Fri, 15 Nov 2013 18:51:14 +0000 Subject: [PATCH] * Jetty: Fix eepsite and webapp cache control directives. Eepsite fix for new installs only. Fix i2psnark BasicServlet javadoc about param prefix. (ticket #1128) --- apps/i2psnark/java/src/org/klomp/snark/web/BasicServlet.java | 5 ++--- .../java/src/net/i2p/router/web/WebAppStarter.java | 2 +- installer/resources/eepsite/contexts/base-context.xml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/BasicServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/BasicServlet.java index c4112ac27d..1383ff2bb6 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/BasicServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/BasicServlet.java @@ -67,9 +67,8 @@ import net.i2p.util.SystemVersion; * The default servlet. * This servlet, normally mapped to /, provides the handling for static * content, OPTION and TRACE methods for the context. - * The following initParameters are supported, these can be set either - * on the servlet itself or as ServletContext initParameters with a prefix - * of org.mortbay.jetty.servlet.Default. : + * The following initParameters are supported, these can be set + * on the servlet itself: * <PRE> * * resourceBase Set to replace the context resource base diff --git a/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java b/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java index d0690a01b6..ac7dc47788 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java @@ -41,7 +41,7 @@ public class WebAppStarter { static { //_log = ContextHelper.getContext(null).logManager().getLog(WebAppStarter.class); ; // see DefaultServlet javadocs - String pfx = "org.mortbay.jetty.servlet.Default."; + String pfx = "org.eclipse.jetty.servlet.Default."; INIT_PARAMS.put(pfx + "cacheControl", "max-age=86400"); INIT_PARAMS.put(pfx + "dirAllowed", "false"); } diff --git a/installer/resources/eepsite/contexts/base-context.xml b/installer/resources/eepsite/contexts/base-context.xml index 36ca36784b..ee995738b8 100644 --- a/installer/resources/eepsite/contexts/base-context.xml +++ b/installer/resources/eepsite/contexts/base-context.xml @@ -12,7 +12,7 @@ to serve static html files and images. <Set name="contextPath">/</Set> <Set name="resourceBase">./eepsite/docroot/</Set> <Call name="setInitParameter"> - <Arg>cacheControl</Arg> + <Arg>org.eclipse.jetty.servlet.Default.cacheControl</Arg> <Arg>max-age=3600,public</Arg> </Call> <Call name="setMimeTypes"> -- GitLab