Skip to content

Commit 5bced78

Browse files
committed
Fixes merge errors
1 parent 06276c9 commit 5bced78

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

spring-cloud-gateway-proxyexchange-webmvc/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,10 @@
6363
<artifactId>spring-boot-configuration-processor</artifactId>
6464
<optional>true</optional>
6565
</dependency>
66+
<dependency>
67+
<groupId>org.springframework.boot</groupId>
68+
<artifactId>spring-boot-starter-security</artifactId>
69+
<scope>test</scope>
70+
</dependency>
6671
</dependencies>
6772
</project>

spring-cloud-gateway-server-webflux/src/test/java/org/springframework/cloud/gateway/filter/headers/TransferEncodingNormalizationHeadersFilterIntegrationTests.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,27 +70,21 @@ public class TransferEncodingNormalizationHeadersFilterIntegrationTests {
7070
@LocalServerPort
7171
private int port;
7272

73-
@Test
74-
void invalidRequestShouldFail() throws Exception {
75-
// Issue a crafted request with smuggling attempt
76-
assertStatus("Should Fail", invalidRequest, "400 Bad Request");
77-
}
78-
7973
@Test
8074
void legitRequestShouldNotFail() throws Exception {
8175
// Issue a legit request, which should not fail
82-
assertStatusWith("200 OK", "Should Not Fail", validRequest.getBytes());
76+
assertStatusWith("200 OK", "Should Not Fail", validRequest);
8377
}
8478

8579
@Test
8680
void badRequestShouldFail() throws Exception {
8781
// Issue a crafted request with smuggling attempt
88-
assertStatusWith("400 Bad Request", "Should Fail", invalidRequest.getBytes());
82+
assertStatusWith("400 Bad Request", "Should Fail", invalidRequest);
8983
}
9084

91-
private void assertStatusWith(String status, String name, byte[] payload) throws Exception {
85+
private void assertStatusWith(String status, String name, String payload) throws Exception {
9286
final String response = execute("localhost", port, payload);
93-
log.info(LogMessage.format("Request to localhost:%d %s\n%s", port, name, new String(payload)));
87+
log.info(LogMessage.format("Request to localhost:%d %s\n%s", port, name, payload));
9488
assertThat(response).isNotNull();
9589
log.info(LogMessage.format("Response %s\n%s", name, response));
9690
assertThat(response).matches("HTTP/1.\\d " + status);

spring-cloud-gateway-server-webmvc/src/test/java/org/springframework/cloud/gateway/server/mvc/ServerMvcIntegrationTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
import org.springframework.web.bind.annotation.PostMapping;
8585
import org.springframework.web.bind.annotation.RequestBody;
8686
import org.springframework.web.bind.annotation.RestController;
87-
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
8887
import org.springframework.web.servlet.function.HandlerFunction;
8988
import org.springframework.web.servlet.function.RouterFunction;
9089
import org.springframework.web.servlet.function.ServerRequest;

0 commit comments

Comments
 (0)