Skip to content

Commit d5606a5

Browse files
Resepect Raw URL setting for query string, too (Grizzly, 1.7.x)
Even with my prior pull request AsyncHttpClient#439 applied, the query string was still escaped twice, when using raw URL. This change fixes it. The function addQueryString() - that I commented out - seems to do nothing that has not already be done when building the URI in the Request. Except it does not care for the isUseRawUrl() setting. If there's a subtle difference I did not notice, isUseRawUrl() should be added inside the body of that function. All of async-http-client tests still pass. com.ning.http.client.async.QueryParametersTest has no tests for raw URLs, though. But our tests now show the same behavior for both Netty and Grizzly.
1 parent b2d2434 commit d5606a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,8 @@ private boolean sendAsGrizzlyRequest(final Request request,
874874
ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent(secure, ctx.getConnection()));
875875

876876
if (!useProxy && !httpCtx.isWSRequest) {
877-
addQueryString(request, requestPacket);
877+
requestPacket.setQueryString(uri.getRawQuery());
878+
//addQueryString(request, requestPacket);
878879
}
879880
addHeaders(request, requestPacket);
880881
addCookies(request, requestPacket);

0 commit comments

Comments
 (0)