Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart messages with empty parts are not correctly parsed in WebFlux #33874

Open
KrisDaCoder opened this issue Nov 13, 2024 · 0 comments
Open
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

Comments

@KrisDaCoder
Copy link

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 13, 2024
@jhoeller jhoeller added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants