@@ -82,11 +82,15 @@ public void setUp() throws Exception {
8282@ Test
8383public void testResolveRedirect_safe () {
8484
85- // default uses prefix matching, both of these should work
85+ // default uses prefix matching, the first one should work fine
8686
8787String res1 = resolver .resolveRedirect (goodUri , client );
8888
8989assertThat (res1 , is (equalTo (goodUri )));
90+
91+ // set the resolver to non-strict and test the path-based redirect resolution
92+
93+ resolver .setStrictMatch (false );
9094
9195String res2 = resolver .resolveRedirect (pathUri , client );
9296
@@ -104,8 +108,7 @@ public void testResolveRedirect_blacklisted() {
104108}
105109
106110@ Test
107- public void testRedirectMatches_strict () {
108- resolver .setStrictMatch (true );
111+ public void testRedirectMatches_default () {
109112
110113// this is not an exact match
111114boolean res1 = resolver .redirectMatches (pathUri , goodUri );
@@ -120,8 +123,11 @@ public void testRedirectMatches_strict() {
120123}
121124
122125@ Test
123- public void testRedirectMatches_default () {
126+ public void testRedirectMatches_nonstrict () {
124127
128+ // set the resolver to non-strict match mode
129+ resolver .setStrictMatch (false );
130+
125131// this is not an exact match (but that's OK)
126132boolean res1 = resolver .redirectMatches (pathUri , goodUri );
127133
0 commit comments