commit | 8c553b9625cea57f8245f144a89249e759129152 | [log] [tgz] |
---|---|---|
author | David Pursehouse <dpursehouse@collab.net> | Wed Jul 26 13:16:31 2017 +0100 |
committer | David Pursehouse <dpursehouse@collab.net> | Wed Jul 26 17:52:58 2017 +0100 |
tree | 6b15de8ae5ac3b080aeb4081b3c0b6c0c79827a0 | |
parent | 7feaaf824b075a0b2daef0062700d490cc905d68 [diff] |
StaticModule: Only attempt to parse polygerrit parameter on GET Attempting to parse parameters on POST/PUT fails with BadMessageException. This occurs for example when making any POST/PUT request to the REST API via the command line. Bug: Issue 6853 Change-Id: I774f1d41b040d2f283804f0394654530e1138cbb
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java index d0d905d..87cb328 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java
@@ -491,7 +491,7 @@ private boolean handlePolyGerritParam(HttpServletRequest req, HttpServletResponse res) throws IOException { - if (!options.enableGwtUi()) { + if (!options.enableGwtUi() || !"GET".equals(req.getMethod())) { return false; } boolean redirect = false;