mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
-1
@@ -630,7 +630,6 @@ public class AsyncRestTemplateIntegrationTests extends AbstractJettyServerTestCa
|
||||
AsyncClientHttpRequestExecution execution) throws IOException {
|
||||
|
||||
request = new HttpRequestWrapper(request) {
|
||||
|
||||
@Override
|
||||
public URI getURI() {
|
||||
try {
|
||||
|
||||
+1
-3
@@ -240,9 +240,7 @@ public class RestTemplateIntegrationTests extends AbstractJettyServerTestCase {
|
||||
assertFalse(s.contains("\"without\":\"without\""));
|
||||
}
|
||||
|
||||
// SPR-12123
|
||||
|
||||
@Test
|
||||
@Test // SPR-12123
|
||||
public void serverPort() {
|
||||
String s = template.getForObject("http://localhost:{port}/get", String.class, port);
|
||||
assertEquals("Invalid content", helloWorld, s);
|
||||
|
||||
+2
-10
@@ -86,9 +86,7 @@ public class RequestPartServletServerHttpRequestTests {
|
||||
assertArrayEquals(bytes, result);
|
||||
}
|
||||
|
||||
// SPR-13317
|
||||
|
||||
@Test
|
||||
@Test // SPR-13317
|
||||
public void getBodyWithWrappedRequest() throws Exception {
|
||||
byte[] bytes = "content".getBytes("UTF-8");
|
||||
MultipartFile part = new MockMultipartFile("part", "", "application/json", bytes);
|
||||
@@ -100,12 +98,9 @@ public class RequestPartServletServerHttpRequestTests {
|
||||
assertArrayEquals(bytes, result);
|
||||
}
|
||||
|
||||
// SPR-13096
|
||||
|
||||
@Test
|
||||
@Test // SPR-13096
|
||||
public void getBodyViaRequestParameter() throws Exception {
|
||||
MockMultipartHttpServletRequest mockRequest = new MockMultipartHttpServletRequest() {
|
||||
|
||||
@Override
|
||||
public HttpHeaders getMultipartHeaders(String paramOrFileName) {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
@@ -116,7 +111,6 @@ public class RequestPartServletServerHttpRequestTests {
|
||||
byte[] bytes = {(byte) 0xC4};
|
||||
mockRequest.setParameter("part", new String(bytes, StandardCharsets.ISO_8859_1));
|
||||
ServerHttpRequest request = new RequestPartServletServerHttpRequest(mockRequest, "part");
|
||||
|
||||
byte[] result = FileCopyUtils.copyToByteArray(request.getBody());
|
||||
assertArrayEquals(bytes, result);
|
||||
}
|
||||
@@ -124,7 +118,6 @@ public class RequestPartServletServerHttpRequestTests {
|
||||
@Test
|
||||
public void getBodyViaRequestParameterWithRequestEncoding() throws Exception {
|
||||
MockMultipartHttpServletRequest mockRequest = new MockMultipartHttpServletRequest() {
|
||||
|
||||
@Override
|
||||
public HttpHeaders getMultipartHeaders(String paramOrFileName) {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
@@ -136,7 +129,6 @@ public class RequestPartServletServerHttpRequestTests {
|
||||
mockRequest.setParameter("part", new String(bytes, StandardCharsets.ISO_8859_1));
|
||||
mockRequest.setCharacterEncoding("iso-8859-1");
|
||||
ServerHttpRequest request = new RequestPartServletServerHttpRequest(mockRequest, "part");
|
||||
|
||||
byte[] result = FileCopyUtils.copyToByteArray(request.getBody());
|
||||
assertArrayEquals(bytes, result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user