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
This commit is contained in:
David Pursehouse
2017-07-26 13:16:31 +01:00
parent 7feaaf824b
commit 8c553b9625

View File

@@ -491,7 +491,7 @@ public class StaticModule extends ServletModule {
private boolean handlePolyGerritParam(HttpServletRequest req, HttpServletResponse res)
throws IOException {
if (!options.enableGwtUi()) {
if (!options.enableGwtUi() || !"GET".equals(req.getMethod())) {
return false;
}
boolean redirect = false;