Commit 9146943a by Johannes Edmeier

Add missing flush to submit headers

parent f7953635
...@@ -67,7 +67,7 @@ public class InstancesProxyController extends AbstractInstancesProxyController { ...@@ -67,7 +67,7 @@ public class InstancesProxyController extends AbstractInstancesProxyController {
@RequestMapping(path = REQUEST_MAPPING_PATH, method = {RequestMethod.GET, RequestMethod.HEAD, RequestMethod.POST, RequestMethod.PUT, RequestMethod.PATCH, RequestMethod.DELETE, RequestMethod.OPTIONS}) @RequestMapping(path = REQUEST_MAPPING_PATH, method = {RequestMethod.GET, RequestMethod.HEAD, RequestMethod.POST, RequestMethod.PUT, RequestMethod.PATCH, RequestMethod.DELETE, RequestMethod.OPTIONS})
public Mono<Void> endpointProxy(@PathVariable("instanceId") String instanceId, public Mono<Void> endpointProxy(@PathVariable("instanceId") String instanceId,
HttpServletRequest servletRequest, HttpServletRequest servletRequest,
HttpServletResponse servletResponse) { HttpServletResponse servletResponse) throws IOException {
ServerHttpRequest request = new ServletServerHttpRequest(servletRequest); ServerHttpRequest request = new ServletServerHttpRequest(servletRequest);
ServerHttpResponse response = new ServletServerHttpResponse(servletResponse); ServerHttpResponse response = new ServletServerHttpResponse(servletResponse);
...@@ -88,6 +88,7 @@ public class InstancesProxyController extends AbstractInstancesProxyController { ...@@ -88,6 +88,7 @@ public class InstancesProxyController extends AbstractInstancesProxyController {
response.setStatusCode(clientResponse.statusCode()); response.setStatusCode(clientResponse.statusCode());
response.getHeaders().addAll(filterHeaders(clientResponse.headers().asHttpHeaders())); response.getHeaders().addAll(filterHeaders(clientResponse.headers().asHttpHeaders()));
response.flush();
return clientResponse.body(BodyExtractors.toDataBuffers()).window(1).flatMap(body -> { return clientResponse.body(BodyExtractors.toDataBuffers()).window(1).flatMap(body -> {
try { try {
......
...@@ -49,7 +49,7 @@ import static de.codecentric.boot.admin.server.utils.MediaType.ACTUATOR_V2_MEDIA ...@@ -49,7 +49,7 @@ import static de.codecentric.boot.admin.server.utils.MediaType.ACTUATOR_V2_MEDIA
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.http.HttpHeaders.CONTENT_TYPE; import static org.springframework.http.HttpHeaders.CONTENT_TYPE;
public abstract class AbstractInstancesProxyControllerTest { public abstract class AbstractInstancesProxyControllerIntegrationTest {
private WebTestClient client; private WebTestClient client;
private ConfigurableApplicationContext context; private ConfigurableApplicationContext context;
private ParameterizedTypeReference<Map<String, Object>> RESPONSE_TYPE = new ParameterizedTypeReference<Map<String, Object>>() { private ParameterizedTypeReference<Map<String, Object>> RESPONSE_TYPE = new ParameterizedTypeReference<Map<String, Object>>() {
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
package de.codecentric.boot.admin.server.web.reactive; package de.codecentric.boot.admin.server.web.reactive;
import de.codecentric.boot.admin.server.AdminReactiveApplicationTest; import de.codecentric.boot.admin.server.AdminReactiveApplicationTest;
import de.codecentric.boot.admin.server.web.AbstractInstancesProxyControllerTest; import de.codecentric.boot.admin.server.web.AbstractInstancesProxyControllerIntegrationTest;
import org.springframework.boot.WebApplicationType; import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerTest { public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerIntegrationTest {
@Override @Override
protected ConfigurableApplicationContext setupContext() { protected ConfigurableApplicationContext setupContext() {
return new SpringApplicationBuilder().sources(AdminReactiveApplicationTest.TestAdminApplication.class) return new SpringApplicationBuilder().sources(AdminReactiveApplicationTest.TestAdminApplication.class)
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
package de.codecentric.boot.admin.server.web.servlet; package de.codecentric.boot.admin.server.web.servlet;
import de.codecentric.boot.admin.server.AdminServletApplicationTest; import de.codecentric.boot.admin.server.AdminServletApplicationTest;
import de.codecentric.boot.admin.server.web.AbstractInstancesProxyControllerTest; import de.codecentric.boot.admin.server.web.AbstractInstancesProxyControllerIntegrationTest;
import org.springframework.boot.WebApplicationType; import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerTest { public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerIntegrationTest {
@Override @Override
protected ConfigurableApplicationContext setupContext() { protected ConfigurableApplicationContext setupContext() {
return new SpringApplicationBuilder().sources(AdminServletApplicationTest.TestAdminApplication.class) return new SpringApplicationBuilder().sources(AdminServletApplicationTest.TestAdminApplication.class)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment