Pass the initiating request URI (or request object) to DefaultWebSocket
In DefaultHttpServer when an UPGRADE request is received a DefaultWebSocket is constructed. It seems however that only the path segment of the URI is passed on as context. Ie:
theURI = new URI(request.getUri());
...
DefaultWebSocket ws = new DefaultWebSocket(vertx, theURI.getPath(), wsConn, connectRunnable);
It would be nice to have the entire URI (for example to retrieve query arguments) or even the entire request to see what headers were passed in the initiating request.
+1 for this
It's a common misconception in HTTP that an absolute url is passed in the request - this is rarely true. Almost always a relative url is passed. So Vert.x is simply passing on what it has received from the client.
Yes, that's true, but query arguments are part of the path passed in the http request. Ie GET /foo/bar?a=b HTTP/1.0
When vert.x only passes the path element of a Java URI this information is lost.
That may be true, but it's a different issue.