Commit 9146943a by Johannes Edmeier

Add missing flush to submit headers

parent f7953635
......@@ -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})
public Mono<Void> endpointProxy(@PathVariable("instanceId") String instanceId,
HttpServletRequest servletRequest,
HttpServletResponse servletResponse) {
HttpServletResponse servletResponse) throws IOException {
ServerHttpRequest request = new ServletServerHttpRequest(servletRequest);
ServerHttpResponse response = new ServletServerHttpResponse(servletResponse);
......@@ -88,6 +88,7 @@ public class InstancesProxyController extends AbstractInstancesProxyController {
response.setStatusCode(clientResponse.statusCode());
response.getHeaders().addAll(filterHeaders(clientResponse.headers().asHttpHeaders()));
response.flush();
return clientResponse.body(BodyExtractors.toDataBuffers()).window(1).flatMap(body -> {
try {
......
......@@ -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.springframework.http.HttpHeaders.CONTENT_TYPE;
public abstract class AbstractInstancesProxyControllerTest {
public abstract class AbstractInstancesProxyControllerIntegrationTest {
private WebTestClient client;
private ConfigurableApplicationContext context;
private ParameterizedTypeReference<Map<String, Object>> RESPONSE_TYPE = new ParameterizedTypeReference<Map<String, Object>>() {
......
......@@ -17,13 +17,13 @@
package de.codecentric.boot.admin.server.web.reactive;
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.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerTest {
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerIntegrationTest {
@Override
protected ConfigurableApplicationContext setupContext() {
return new SpringApplicationBuilder().sources(AdminReactiveApplicationTest.TestAdminApplication.class)
......
......@@ -17,13 +17,13 @@
package de.codecentric.boot.admin.server.web.servlet;
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.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerTest {
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerIntegrationTest {
@Override
protected ConfigurableApplicationContext setupContext() {
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