Describe the bug
With spring cloud gateway mvc 2023.0.0 when we perform an post request with multi part and query string, the query string was loose.
Exemple with an test server on port 9008 and a gateway on port 9007
if i point on the server directly :


if i use the gateway :


Sample
http-interceptor : (it's juste a test server to print the query param)
public class MainStandAlone {
public static void main(String[] args) throws IOException {
ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(10);
HttpServer server = HttpServer.create(new InetSocketAddress("localhost", 9008), 0);
server.createContext("/", exchange -> {
System.out.println(exchange.getRequestURI());
exchange.getResponseBody().write("OK".getBytes(StandardCharsets.UTF_8));
exchange.sendResponseHeaders(200, "OK".length());
exchange.getResponseBody().flush();
exchange.getResponseBody().close();
});
server.setExecutor(threadPoolExecutor);
server.start();
System.out.println(" Server started on port 9008");
}
}
gateway : (spring initializr)
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
@Configuration
public static class GatewayConfiguration {
@Bean
public RouterFunction<ServerResponse> routerFunction() {
return route()
.POST("/test", http("http://localhost:9008"))
.build();
}
}
}
EDIT:
Moreover the header Content-Length are delete by the gateway
Describe the bug
With spring cloud gateway mvc 2023.0.0 when we perform an post request with multi part and query string, the query string was loose.
Exemple with an test server on port 9008 and a gateway on port 9007




if i point on the server directly :
if i use the gateway :
Sample
http-interceptor : (it's juste a test server to print the query param)
gateway : (spring initializr)
EDIT:
Moreover the header Content-Length are delete by the gateway