1
1
/*
2
- * Copyright 2002-2022 the original author or authors.
2
+ * Copyright 2002-202 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ void removeOnly() {
57
57
}
58
58
59
59
@ Test
60
- void xForwardedHeaders () throws Exception {
60
+ void xForwardedHeaders () {
61
61
HttpHeaders headers = new HttpHeaders ();
62
62
headers .add ("X-Forwarded-Host" , "84.198.58.199" );
63
63
headers .add ("X-Forwarded-Port" , "443" );
@@ -70,7 +70,7 @@ void xForwardedHeaders() throws Exception {
70
70
}
71
71
72
72
@ Test
73
- void forwardedHeader () throws Exception {
73
+ void forwardedHeader () {
74
74
HttpHeaders headers = new HttpHeaders ();
75
75
headers .add ("Forwarded" , "host=84.198.58.199;proto=https" );
76
76
ServerHttpRequest request = this .requestMutator .apply (getRequest (headers ));
@@ -80,7 +80,7 @@ void forwardedHeader() throws Exception {
80
80
}
81
81
82
82
@ Test
83
- void xForwardedPrefix () throws Exception {
83
+ void xForwardedPrefix () {
84
84
HttpHeaders headers = new HttpHeaders ();
85
85
headers .add ("X-Forwarded-Prefix" , "/prefix" );
86
86
ServerHttpRequest request = this .requestMutator .apply (getRequest (headers ));
@@ -91,7 +91,7 @@ void xForwardedPrefix() throws Exception {
91
91
}
92
92
93
93
@ Test // gh-23305
94
- void xForwardedPrefixShouldNotLeadToDecodedPath () throws Exception {
94
+ void xForwardedPrefixShouldNotLeadToDecodedPath () {
95
95
HttpHeaders headers = new HttpHeaders ();
96
96
headers .add ("X-Forwarded-Prefix" , "/prefix" );
97
97
ServerHttpRequest request = MockServerHttpRequest
@@ -107,7 +107,7 @@ void xForwardedPrefixShouldNotLeadToDecodedPath() throws Exception {
107
107
}
108
108
109
109
@ Test
110
- void xForwardedPrefixTrailingSlash () throws Exception {
110
+ void xForwardedPrefixTrailingSlash () {
111
111
HttpHeaders headers = new HttpHeaders ();
112
112
headers .add ("X-Forwarded-Prefix" , "/prefix////" );
113
113
ServerHttpRequest request = this .requestMutator .apply (getRequest (headers ));
@@ -118,7 +118,7 @@ void xForwardedPrefixTrailingSlash() throws Exception {
118
118
}
119
119
120
120
@ Test // SPR-17525
121
- void shouldNotDoubleEncode () throws Exception {
121
+ void shouldNotDoubleEncode () {
122
122
HttpHeaders headers = new HttpHeaders ();
123
123
headers .add ("Forwarded" , "host=84.198.58.199;proto=https" );
124
124
@@ -133,8 +133,8 @@ void shouldNotDoubleEncode() throws Exception {
133
133
assertForwardedHeadersRemoved (request );
134
134
}
135
135
136
- @ Test
137
- void shouldHandleUnencodedUri () throws Exception {
136
+ @ Test // gh-30137
137
+ void shouldHandleUnencodedUri () {
138
138
HttpHeaders headers = new HttpHeaders ();
139
139
headers .add ("Forwarded" , "host=84.198.58.199;proto=https" );
140
140
ServerHttpRequest request = MockServerHttpRequest
@@ -149,7 +149,7 @@ void shouldHandleUnencodedUri() throws Exception {
149
149
}
150
150
151
151
@ Test
152
- void shouldConcatenatePrefixes () throws Exception {
152
+ void shouldConcatenatePrefixes () {
153
153
HttpHeaders headers = new HttpHeaders ();
154
154
headers .add ("X-Forwarded-Prefix" , "/first,/second" );
155
155
ServerHttpRequest request = this .requestMutator .apply (getRequest (headers ));
@@ -160,7 +160,7 @@ void shouldConcatenatePrefixes() throws Exception {
160
160
}
161
161
162
162
@ Test
163
- void shouldConcatenatePrefixesWithTrailingSlashes () throws Exception {
163
+ void shouldConcatenatePrefixesWithTrailingSlashes () {
164
164
HttpHeaders headers = new HttpHeaders ();
165
165
headers .add ("X-Forwarded-Prefix" , "/first/,/second//" );
166
166
ServerHttpRequest request = this .requestMutator .apply (getRequest (headers ));
0 commit comments