reta closed pull request #430: [CXF-7799] Extract queryString from
AtmosphereRequest path
URL: https://github.com/apache/cxf/pull/430
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
index 3c6ffff280d..ae35901a4b3 100644
---
a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
+++
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
@@ -269,6 +269,13 @@ protected AtmosphereRequest
createAtmosphereRequest(AtmosphereRequest r, byte[]
throw new InvalidPathException();
}
+ String queryString = "";
+ int index = path.indexOf("?");
+ if (index != -1) {
+ queryString = path.substring(index + 1);
+ path = path.substring(0, index);
+ }
+
String requestURI = path;
String requestURL = r.getRequestURL() +
requestURI.substring(r.getRequestURI().length());
String contentType = hdrs.get("Content-Type");
@@ -280,6 +287,7 @@ protected AtmosphereRequest
createAtmosphereRequest(AtmosphereRequest r, byte[]
.method(method)
.requestURI(requestURI)
.requestURL(requestURL)
+ .queryString(queryString)
.request(r);
// add the body only if it is present
byte[] body = WebSocketUtils.readBody(in);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services