Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug fix

git-svn-id: file:///Users/billburke/jboss/resteasy/resteasy-git/svn-server-sync/resteasy/trunk/jaxrs@881 2b1ed4c4-5db3-0410-90e4-80a7a6204c25
  • Loading branch information...
commit 5961b1e1439d7bab1fa0a6d0d806e003bdbd8ccf 1 parent 056d4d4
patriot1burke authored
View
12 resteasy-jaxrs/src/main/java/org/jboss/resteasy/util/Encode.java
@@ -89,10 +89,14 @@ public static String encodeQueryStringNameOrValue(String string)
foundParam = true;
string = buf.toString();
}
- /*
- string = URLEncoder.encode(string, "UTF-8").replace("%25", "%");
- */
- string = URLUtils.encodeQueryNameOrValue(string).replace("%25", "%");
+ try
+ {
+ string = URLEncoder.encode(string, "UTF-8").replace("%25", "%");
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ throw new RuntimeException(e);
+ }
string = encodeNonCodes(string);
if (foundParam)
{
View
2  resteasy-jaxrs/src/test/java/org/jboss/resteasy/test/finegrain/UriBuilderTest.java
@@ -33,7 +33,7 @@ public void testEmoji()
builder.queryParam("msg", "emoji stuff %EE%81%96%EE%90%8F");
URI uri = builder.build();
System.out.println(uri);
- Assert.assertEquals("/my/url?msg=emoji%20stuff%20%EE%81%96%EE%90%8F", uri.toString());
+ Assert.assertEquals("/my/url?msg=emoji+stuff+%EE%81%96%EE%90%8F", uri.toString());
}
Please sign in to comment.
Something went wrong with that request. Please try again.