Author: remy.maucherat(a)jboss.com
Date: 2011-03-30 12:35:30 -0400 (Wed, 30 Mar 2011)
New Revision: 1689
Modified:
trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
trunk/java/org/apache/coyote/ajp/AjpProtocol.java
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
Log:
- Escape '/' in address, to beautify things.
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2011-03-30 16:34:56 UTC (rev
1688)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2011-03-30 16:35:30 UTC (rev
1689)
@@ -289,9 +289,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/',
'-')) + "-";
}
return ("ajp-" + encodedAddr + endpoint.getPort());
}
Modified: trunk/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2011-03-30 16:34:56 UTC (rev 1688)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2011-03-30 16:35:30 UTC (rev 1689)
@@ -266,9 +266,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/',
'-')) + "-";
}
return ("ajp-" + encodedAddr + endpoint.getPort());
}
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2011-03-30 16:34:56 UTC
(rev 1688)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2011-03-30 16:35:30 UTC
(rev 1689)
@@ -234,9 +234,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/',
'-')) + "-";
}
return ("http-" + encodedAddr + endpoint.getPort());
}
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2011-03-30 16:34:56 UTC (rev
1688)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2011-03-30 16:35:30 UTC (rev
1689)
@@ -280,9 +280,7 @@
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
- if (encodedAddr.startsWith("/"))
- encodedAddr = encodedAddr.substring(1);
- encodedAddr = URLEncoder.encode(encodedAddr) + "-";
+ encodedAddr = URLEncoder.encode(encodedAddr.replace('/',
'-')) + "-";
}
return ("http-" + encodedAddr + endpoint.getPort());
}
Show replies by date