asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject asterixdb git commit: Strip query string from servlet localPath
Date Sat, 10 Jun 2017 02:20:10 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master cb0c265fc -> 223ec90a4


Strip query string from servlet localPath

Path should not contain query string; remove it when extracting
localPath from request uri.

Change-Id: I0b4942fb1249807fcee9d3047568dc1749798d85
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1819
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/223ec90a
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/223ec90a
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/223ec90a

Branch: refs/heads/master
Commit: 223ec90a4580fbbea01d410e1056e83951a6375e
Parents: cb0c265
Author: Michael Blow <mblow@apache.org>
Authored: Fri Jun 9 02:35:38 2017 -0400
Committer: Michael Blow <mblow@apache.org>
Committed: Fri Jun 9 19:19:49 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hyracks/http/server/AbstractServlet.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/223ec90a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
index d029bbc..1030686 100644
--- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
+++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
@@ -139,7 +139,8 @@ public abstract class AbstractServlet implements IServlet {
 
     public String localPath(IServletRequest request) {
         final String uri = request.getHttpRequest().uri();
-        return uri.substring(trim(uri));
+        int queryStart = uri.indexOf("?");
+        return queryStart == -1 ? uri.substring(trim(uri)) : uri.substring(trim(uri), queryStart);
     }
 
     public String servletPath(IServletRequest request) {


Mime
View raw message