summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/server
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-10-07 12:54:05 +0000
committerArtur Signell <artur.signell@itmill.com>2011-10-07 12:54:05 +0000
commitbe92f9fdec44857baf8bd97e8a1b87f49d206b1e (patch)
treee124e0469fe783fcafe54106d58b9ad79cc711a2 /src/com/vaadin/terminal/gwt/server
parentf15eaf3a2c32a94418256b44e681d2154de01ce7 (diff)
downloadvaadin-framework-be92f9fdec44857baf8bd97e8a1b87f49d206b1e.tar.gz
vaadin-framework-be92f9fdec44857baf8bd97e8a1b87f49d206b1e.zip
#5488 Avoid encoding slashes and back slashes in ApplicationResource URLs
svn changeset:21646/svn branch:6.7
Diffstat (limited to 'src/com/vaadin/terminal/gwt/server')
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java b/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
index f619c1c239..26f23d6abc 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
@@ -175,7 +175,13 @@ public abstract class AbstractWebApplicationContext implements
if (filename == null) {
return "app://APP/" + mapKey + "/";
} else {
- return "app://APP/" + mapKey + "/" + urlEncode(filename);
+ // #5488 At least Tomcat and JBoss refuses requests containing
+ // encoded slashes or backslashes in URLs. Application resource URLs
+ // should really be passed in another way than as part of the path
+ // in the future.
+ String encodedFileName = urlEncode(filename).replace("%2F", "/")
+ .replace("%5C", "\\");
+ return "app://APP/" + mapKey + "/" + encodedFileName;
}
}