File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
spring-web/src/test/java/org/springframework/web/server/adapter Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,21 @@ void shouldNotDoubleEncode() throws Exception {
133
133
assertForwardedHeadersRemoved (request );
134
134
}
135
135
136
+ @ Test
137
+ void shouldHandleUnencodedUri () throws Exception {
138
+ HttpHeaders headers = new HttpHeaders ();
139
+ headers .add ("Forwarded" , "host=84.198.58.199;proto=https" );
140
+ ServerHttpRequest request = MockServerHttpRequest
141
+ .method (HttpMethod .GET , URI .create ("https://example.com/a?q=1+1=2" ))
142
+ .headers (headers )
143
+ .build ();
144
+
145
+ request = this .requestMutator .apply (request );
146
+
147
+ assertThat (request .getURI ()).isEqualTo (URI .create ("https://84.198.58.199/a?q=1+1=2" ));
148
+ assertForwardedHeadersRemoved (request );
149
+ }
150
+
136
151
@ Test
137
152
void shouldConcatenatePrefixes () throws Exception {
138
153
HttpHeaders headers = new HttpHeaders ();
You can’t perform that action at this time.
0 commit comments