From 67e095e2047d9661d922d03f5e64da495c9a91bd Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 24 May 2010 11:42:06 +0000 Subject: [PATCH] 305898 Websocket handles query string in URI git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1851 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 3 +++ .../org/eclipse/jetty/server/handler/IPAccessHandlerTest.java | 1 - .../java/org/eclipse/jetty/websocket/WebSocketFactory.java | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index a7e4e16e7f8..760357146dc 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,3 +1,6 @@ +jetty-7.1.3-SNAPSHOT + + 305898 Websocket handles query string in URI + jetty-7.1.2.v20100523 + 308866 Update test suite to JUnit4 - Module jetty-util + 312948 Recycle SSL crypto buffers diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java index 0ff588c685c..6ac5e7969f5 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java @@ -77,7 +77,6 @@ public class IPAccessHandlerTest } }); _server.setHandler(_handler); - Log.getLog().setDebugEnabled(true); _server.start(); } diff --git a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java index c69136bc009..1b3fc5b3c1c 100644 --- a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java +++ b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java @@ -93,8 +93,10 @@ public class WebSocketFactory WebSocketConnection connection = new WebSocketConnection(websocket,endp,_buffers,http.getTimeStamp(), _maxIdleTime); String uri=request.getRequestURI(); + String query=request.getQueryString(); + if (query!=null && query.length()>0) + uri+="?"+query; String host=request.getHeader("Host"); - response.setHeader("Upgrade","WebSocket"); response.addHeader("Connection","Upgrade"); response.addHeader("WebSocket-Origin",origin);