File tree 2 files changed +8
-4
lines changed
main/java/org/springframework/web/util
test/java/org/springframework/web/util
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ private String removeSemicolonContentInternal(String requestUri) {
457
457
}
458
458
459
459
private String removeJsessionid (String requestUri ) {
460
- int startIndex = requestUri .indexOf (";jsessionid=" );
460
+ int startIndex = requestUri .toLowerCase (). indexOf (";jsessionid=" );
461
461
if (startIndex != -1 ) {
462
462
int endIndex = requestUri .indexOf (';' , startIndex + 12 );
463
463
String start = requestUri .substring (0 , startIndex );
Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .web .util ;
18
18
19
- import static org .junit .Assert .assertEquals ;
20
- import static org .junit .Assert .assertNull ;
21
-
22
19
import java .io .UnsupportedEncodingException ;
23
20
24
21
import org .junit .Before ;
25
22
import org .junit .Ignore ;
26
23
import org .junit .Test ;
27
24
import org .springframework .mock .web .test .MockHttpServletRequest ;
28
25
26
+ import static org .junit .Assert .*;
27
+
29
28
/**
30
29
* @author Rob Harrop
31
30
* @author Juergen Hoeller
@@ -111,6 +110,11 @@ public void getRequestKeepSemicolonContent() throws UnsupportedEncodingException
111
110
112
111
request .setRequestURI ("/foo;a=b;jsessionid=c0o7fszeb1;c=d" );
113
112
assertEquals ("jsessionid should always be removed" , "/foo;a=b;c=d" , helper .getRequestUri (request ));
113
+
114
+ // SPR-10398
115
+
116
+ request .setRequestURI ("/foo;a=b;JSESSIONID=c0o7fszeb1;c=d" );
117
+ assertEquals ("JSESSIONID should always be removed" , "/foo;a=b;c=d" , helper .getRequestUri (request ));
114
118
}
115
119
116
120
@ Test
You can’t perform that action at this time.
0 commit comments