From 9b5f35f1cf9afbe9c7f2707a1cd31b088f88b334 Mon Sep 17 00:00:00 2001 From: Christian Kaltepoth Date: Tue, 20 Jan 2015 08:04:38 +0100 Subject: [PATCH] Test to reproduce (currently ignored) #195 --- .../config/JoinEncodingConfigurationTest.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config/JoinEncodingConfigurationTest.java b/config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config/JoinEncodingConfigurationTest.java index a6eb67c37..25ac3b41b 100644 --- a/config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config/JoinEncodingConfigurationTest.java +++ b/config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config/JoinEncodingConfigurationTest.java @@ -33,6 +33,7 @@ import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.ocpsoft.common.util.Streams; @@ -83,6 +84,30 @@ public void testJoinEncodingSpaceCharacter() throws Exception assertThat(responseContent, containsString("getParameter('param') = foo bar")); } + @Test + @Ignore // see: https://github.com/ocpsoft/rewrite/issues/195 + public void testJoinSupportsSingleCurlyBrace() throws Exception + { + HttpAction action = get("/encoding/foo%7Bbar"); + assertEquals(200, action.getResponse().getStatusLine().getStatusCode()); + + String responseContent = action.getResponseContent(); + assertThat(responseContent, containsString("getRequestPath() = " + getContextPath() + "/encoding.html")); + assertThat(responseContent, containsString("getParameter('param') = foo{bar")); + } + + @Test + @Ignore // see: https://github.com/ocpsoft/rewrite/issues/195 + public void testJoinSupportsCurlyBraceGroup() throws Exception + { + HttpAction action = get("/encoding/foo%7Bbar%7D"); + assertEquals(200, action.getResponse().getStatusLine().getStatusCode()); + + String responseContent = action.getResponseContent(); + assertThat(responseContent, containsString("getRequestPath() = " + getContextPath() + "/encoding.html")); + assertThat(responseContent, containsString("getParameter('param') = foo{bar}")); + } + /** * Ampersands don't have to be encoded in the path segment (rfc2396, section 3.3). Make sure this works when * transforming it into a query parameter.