Browse Source

make sure to send in the query string too

Mike Megally 9 years ago
parent
commit
df0fd141ba

+ 7 - 1
frameworks/Java/undertow-jersey/src/main/java/hello/undertow/UndertowJerseyContainer.java

@@ -86,8 +86,14 @@ public class UndertowJerseyContainer
   public void handleRequest(final HttpServerExchange httpServerExchange)
       throws Exception
   {
+    String requestUri = httpServerExchange.getRequestURI();
+    if(httpServerExchange.getQueryString().length() > 0)
+    {
+      requestUri = requestUri + "?" + httpServerExchange.getQueryString();
+    }
+
     final ContainerRequest request = new ContainerRequest(null,
-        URI.create(httpServerExchange.getRequestURI()),
+        URI.create(requestUri),
         httpServerExchange.getRequestMethod().toString(),
         DEFAULT_SECURITY_CONTEXT, new MapPropertiesDelegate());