Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2015-04-13 14:21:48 +0000
committerSimone Bordet2015-04-13 14:21:48 +0000
commit599ab9bb1bee454f190d964b67859e46a1e57f87 (patch)
treeb729472f7fc361ec6b84526c74cf193c383e77b7 /jetty-rewrite
parentd78673f8f824d562bf181fe2aaf929bad6f6e695 (diff)
downloadorg.eclipse.jetty.project-599ab9bb1bee454f190d964b67859e46a1e57f87.tar.gz
org.eclipse.jetty.project-599ab9bb1bee454f190d964b67859e46a1e57f87.tar.xz
org.eclipse.jetty.project-599ab9bb1bee454f190d964b67859e46a1e57f87.zip
460671 - Rationalize property names.
Property format is now "jetty.<module|component>.<propertyName>". Updated all references with new properties.
Diffstat (limited to 'jetty-rewrite')
-rw-r--r--jetty-rewrite/src/main/config/etc/jetty-rewrite.xml52
-rw-r--r--jetty-rewrite/src/main/config/modules/rewrite.mod10
-rw-r--r--jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml9
3 files changed, 38 insertions, 33 deletions
diff --git a/jetty-rewrite/src/main/config/etc/jetty-rewrite.xml b/jetty-rewrite/src/main/config/etc/jetty-rewrite.xml
index 706a9328b0..714bcd91e6 100644
--- a/jetty-rewrite/src/main/config/etc/jetty-rewrite.xml
+++ b/jetty-rewrite/src/main/config/etc/jetty-rewrite.xml
@@ -8,34 +8,32 @@
<Configure id="Server" class="org.eclipse.jetty.server.Server">
- <!-- =========================================================== -->
- <!-- configure rewrite handler -->
- <!-- =========================================================== -->
- <Get id="oldhandler" name="handler"/>
+ <!-- =========================================================== -->
+ <!-- configure rewrite handler -->
+ <!-- =========================================================== -->
+ <Get id="oldhandler" name="handler"/>
- <Set name="handler">
- <New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
+ <Set name="handler">
+ <New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
<Set name="handler"><Ref refid="oldhandler"/></Set>
- <Set name="rewriteRequestURI"><Property name="rewrite.rewriteRequestURI" default="true"/></Set>
- <Set name="rewritePathInfo"><Property name="rewrite.rewritePathInfo" default="false"/></Set>
- <Set name="originalPathAttribute"><Property name="rewrite.originalPathAttribute" default="requestedPath"/></Set>
- </New>
- </Set>
-
- <!-- example rule -->
- <!--
- <Call name="addRule">
- <Arg>
- <New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
- <Set name="pattern">/favicon.ico</Set>
- <Set name="name">Cache-Control</Set>
- <Set name="value">Max-Age=3600,public</Set>
- <Set name="terminating">true</Set>
- </New>
- </Arg>
- </Call>
- -->
-
- <!-- for example rules see jetty-demo.xml -->
+ <Set name="rewriteRequestURI"><Property name="jetty.rewrite.rewriteRequestURI,rewrite.rewriteRequestURI" default="true"/></Set>
+ <Set name="rewritePathInfo"><Property name="jetty.rewrite.rewritePathInfo,rewrite.rewritePathInfo" default="false"/></Set>
+ <Set name="originalPathAttribute"><Property name="jetty.rewrite.originalPathAttribute,rewrite.originalPathAttribute" default="requestedPath"/></Set>
+ </New>
+ </Set>
+
+ <!-- example rule -->
+ <!--
+ <Call name="addRule">
+ <Arg>
+ <New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
+ <Set name="pattern">/favicon.ico</Set>
+ <Set name="name">Cache-Control</Set>
+ <Set name="value">Max-Age=3600,public</Set>
+ <Set name="terminating">true</Set>
+ </New>
+ </Arg>
+ </Call>
+ -->
</Configure>
diff --git a/jetty-rewrite/src/main/config/modules/rewrite.mod b/jetty-rewrite/src/main/config/modules/rewrite.mod
index d2e00c8e89..c8a1750618 100644
--- a/jetty-rewrite/src/main/config/modules/rewrite.mod
+++ b/jetty-rewrite/src/main/config/modules/rewrite.mod
@@ -10,3 +10,13 @@ lib/jetty-rewrite-${jetty.version}.jar
[xml]
etc/jetty-rewrite.xml
+
+[ini-template]
+## Whether to rewrite the request URI
+# jetty.rewrite.rewriteRequestURI=true
+
+## Whether to rewrite the path info
+# jetty.rewrite.rewritePathInfo=false
+
+## Request attribute key under with the original path is stored
+# jetty.rewrite.originalPathAttribute=requestedPath
diff --git a/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml b/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml
index b54d24fb08..6f0dede493 100644
--- a/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml
+++ b/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml
@@ -39,12 +39,9 @@
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ServerConnector">
- <Set name="host"><SystemProperty name="jetty.host" /></Set>
- <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
+ <Set name="host"><SystemProperty name="jetty.http.host" /></Set>
+ <Set name="port"><SystemProperty name="jetty.http.port" default="8080"/></Set>
<Set name="idleTimeout">30000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="statsOn">false</Set>
- <Set name="confidentialPort">8443</Set>
</New>
</Arg>
</Call>
@@ -259,7 +256,7 @@
<Ref refid="RequestLog">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
- <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
+ <Set name="filename"><SystemProperty name="jetty.requestlog.dir" default="./logs"/>/yyyy_mm_dd.request.log</Set>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="retainDays">90</Set>
<Set name="append">true</Set>

Back to the top