Multipart messages with empty parts are not correctly parsed in WebFlux #33874
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: waiting-for-triage
An issue we've not yet triaged or decided on
In my application spring boot webflux application I have an upload use case which requires the upload of 1 and more empty files. The upload endpoint is pretty simple in itself and goes like this:
public Mono<ResponseEntity<ResponseDTO>> upload(@RequestPart("files")Flux<FilePart> fileParts) { // fileParts.flatMap(filePart -> // will only contain the last empty file always if more than one empty file is uploaded) }
The problem is that if more than 1 empty files are uploaded, then only the last one is considered.
This issue started when upgrading from spring boot 2.7.18 to 3.3.5.
I saw a similar issue to this #30953 which has already been closed but I'm still having something similar. I tried though to reproduce it using the webTestClient in an automated test but to no avail. Maybe this explains #30953.
The text was updated successfully, but these errors were encountered: