File tree Expand file tree Collapse file tree
config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,6 +83,28 @@ public void testJoinEncodingSpaceCharacter() throws Exception
8383 assertThat (responseContent , containsString ("getParameter('param') = foo bar" ));
8484 }
8585
86+ @ Test
87+ public void testJoinSupportsSingleCurlyBrace () throws Exception
88+ {
89+ HttpAction <HttpGet > action = get ("/encoding/foo%7Bbar" );
90+ assertEquals (200 , action .getResponse ().getStatusLine ().getStatusCode ());
91+
92+ String responseContent = action .getResponseContent ();
93+ assertThat (responseContent , containsString ("getRequestPath() = " + getContextPath () + "/encoding.html" ));
94+ assertThat (responseContent , containsString ("getParameter('param') = foo{bar" ));
95+ }
96+
97+ @ Test
98+ public void testJoinSupportsCurlyBraceGroup () throws Exception
99+ {
100+ HttpAction <HttpGet > action = get ("/encoding/foo%7Bbar%7D" );
101+ assertEquals (200 , action .getResponse ().getStatusLine ().getStatusCode ());
102+
103+ String responseContent = action .getResponseContent ();
104+ assertThat (responseContent , containsString ("getRequestPath() = " + getContextPath () + "/encoding.html" ));
105+ assertThat (responseContent , containsString ("getParameter('param') = foo{bar}" ));
106+ }
107+
86108 /**
87109 * Ampersands don't have to be encoded in the path segment (rfc2396, section 3.3). Make sure this works when
88110 * transforming it into a query parameter.
You can’t perform that action at this time.
0 commit comments