File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
main/java/org/springframework/web/util
test/java/org/springframework/web/util Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,6 @@ public void setRemoveSemicolonContent(boolean removeSemicolonContent) {
147147 * Whether configured to remove ";" (semicolon) content from the request URI.
148148 */
149149 public boolean shouldRemoveSemicolonContent () {
150- checkReadOnly ();
151150 return this .removeSemicolonContent ;
152151 }
153152
Original file line number Diff line number Diff line change 2222import org .springframework .web .testfixture .servlet .MockHttpServletRequest ;
2323
2424import static org .assertj .core .api .Assertions .assertThat ;
25+ import static org .assertj .core .api .Assertions .assertThatCode ;
2526
2627/**
2728 * Unit tests for {@link UrlPathHelper}.
@@ -165,6 +166,11 @@ public void getLookupPathWithSemicolonContentAndNullPathInfo() {
165166 assertThat (helper .getLookupPathForRequest (request )).isEqualTo ("/welcome.html;c=d" );
166167 }
167168
169+ @ Test // gh-27303
170+ public void shouldRemoveSemicolonContentWithReadOnlyInstance () {
171+ assertThatCode (UrlPathHelper .defaultInstance ::shouldRemoveSemicolonContent ).doesNotThrowAnyException ();
172+ }
173+
168174
169175 //
170176 // suite of tests root requests for default servlets (SRV 11.2) on Websphere vs Tomcat and other containers
You can’t perform that action at this time.
0 commit comments