428266 - HttpRequest mangles URI query string.

Now raw query string is preserved.
This commit is contained in:
Simone Bordet 2014-02-21 17:55:19 +01:00
parent 3e52b60452
commit 34aa88472a
1 changed files with 2 additions and 1 deletions

View File

@ -188,6 +188,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
{
final String paramName = "a";
final String paramValue = "\u20AC";
final String encodedParamValue = URLEncoder.encode(paramValue, "UTF-8");
start(new AbstractHandler()
{
@Override
@ -204,7 +205,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
}
});
URI uri = URI.create(scheme + "://localhost:" + connector.getLocalPort() + "/path?" + paramName + "=" + paramValue);
URI uri = URI.create(scheme + "://localhost:" + connector.getLocalPort() + "/path?" + paramName + "=" + encodedParamValue);
ContentResponse response = client.newRequest(uri)
.method(HttpMethod.PUT)
.timeout(5, TimeUnit.SECONDS)