File tree Expand file tree Collapse file tree
config-prettyfaces/src/main/java/com/ocpsoft/pretty
config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config
impl-servlet/src/main/java/org/ocpsoft/rewrite/servlet/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public class PrettyContext implements Serializable
5050 public static final String PRETTY_PREFIX = "pretty:" ;
5151 private static final String CONTEXT_REQUEST_KEY = "prettyContext" ;
5252
53- private static final Pattern JSESSIONID_PATTERN = Pattern .compile ("(?i)^(.*);jsessionid=[\\ w\\ .\\ -]+(.*)" );
53+ private static final Pattern JSESSIONID_PATTERN = Pattern .compile ("(?i)^(.*);jsessionid=[\\ w\\ .\\ -\\ + ]+(.*)" );
5454 private static final String JSESSIONID_REPLACEMENT = "$1$2" ;
5555
5656 private PrettyConfig config ;
Original file line number Diff line number Diff line change @@ -90,13 +90,22 @@ public void testPathRuleMatchesWithSessionId() throws Exception
9090 assertEquals (210 , action .getResponse ().getStatusLine ().getStatusCode ());
9191 }
9292
93+ @ Test
9394 public void testPathRuleMatchesWithGoogleAppEngineSessionId () throws Exception
9495 {
9596 // see: https://github.com/ocpsoft/prettyfaces/issues/15
9697 HttpAction <HttpGet > action = get ("/path;jsessionid=1E-y6jzfx53ou9wymGmcfw" );
9798 assertEquals (210 , action .getResponse ().getStatusLine ().getStatusCode ());
9899 }
99100
101+ @ Test
102+ public void testPathRuleMatchesWithJBoss713 () throws Exception
103+ {
104+ // see: https://github.com/ocpsoft/rewrite/issues/173
105+ HttpAction <HttpGet > action = get ("/path;jsessionid=1E+y6jzfx53ou9wymGmcfw" );
106+ assertEquals (210 , action .getResponse ().getStatusLine ().getStatusCode ());
107+ }
108+
100109 @ Test
101110 public void testPathRuleMatchesWithTomcatClusterSessionId () throws Exception
102111 {
Original file line number Diff line number Diff line change 3838public abstract class BaseHttpRewrite extends BaseRewrite <HttpServletRequest , HttpServletResponse > implements
3939 HttpServletRewrite
4040{
41- private static final Pattern JSESSIONID_PATTERN = Pattern .compile ("(?i)^(.*);jsessionid=[\\ w\\ .\\ -]+(.*)" );
41+ private static final Pattern JSESSIONID_PATTERN = Pattern .compile ("(?i)^(.*);jsessionid=[\\ w\\ .\\ -\\ + ]+(.*)" );
4242 private static final String JSESSIONID_REPLACEMENT = "$1$2" ;
4343
4444 /*
You can’t perform that action at this time.
0 commit comments