summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-06-28 18:46:16 +0300
committerLeif Åstrand <leif@vaadin.com>2012-06-28 18:47:23 +0300
commit2d9849ebfe70fff9bcb832e373baada14b0d387d (patch)
tree5e1a1099c4f83e844086f612c1158ccca4d55150 /src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
parente9b1233e49b66c97f5237538e8299ad75aa9c88b (diff)
downloadvaadin-framework-2d9849ebfe70fff9bcb832e373baada14b0d387d.tar.gz
vaadin-framework-2d9849ebfe70fff9bcb832e373baada14b0d387d.zip
Update #9048 based on reviews
Diffstat (limited to 'src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java')
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index 6930961497..7d88b432f4 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -136,8 +136,6 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
static final String UPLOAD_URL_PREFIX = "APP/UPLOAD/";
- static final String CONNECTOR_RESOURCE_PREFIX = "/APP/CONNECTOR/";
-
/**
* Called by the servlet container to indicate to a servlet that the servlet
* is being placed into service.
@@ -400,8 +398,10 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
if (requestType == RequestType.CONNECTOR_RESOURCE) {
String pathInfo = getRequestPathInfo(request);
+ // + 2 to also remove beginning and ending slashes
String resourceName = pathInfo
- .substring(CONNECTOR_RESOURCE_PREFIX.length());
+ .substring(ApplicationConnection.CONNECTOR_RESOURCE_PREFIX
+ .length() + 2);
final String mimetype = getServletContext().getMimeType(
resourceName);
@@ -1295,7 +1295,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
private boolean isConnectorResourceRequest(HttpServletRequest request) {
String path = getRequestPathInfo(request);
- if (path != null && path.startsWith(CONNECTOR_RESOURCE_PREFIX)) {
+ if (path != null
+ && path.startsWith('/' + ApplicationConnection.CONNECTOR_RESOURCE_PREFIX + '/')) {
return true;
}
return false;