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;