Validation of PartEventHttpMessageReader#maxParts
is off by one
#32122
Milestone
PartEventHttpMessageReader#maxParts
is off by one
#32122
Boot: 3.2.2
Framework: 6.1.3
PartEventHttpMessageReader#maxParts
, configured viaspring.webflux.multipart.max-parts
, is validated incorrectly. Sending a multipart request with as many parts as should be allowed by that property is rejected withToo many parts
.This means that if I want to allow at most 5 parts, I'll have to set
spring.webflux.multipart.max-parts=6
.Controller:
This test creates as many file parts as configured via
spring.webflux.multipart.max-parts
and sends them to the controller method above, expecting success. The request is however rejected and the following exception is thrown:org.springframework.core.codec.DecodingException: Too many parts (6/5 allowed)
Reproducer (extract and run
./mvnw test
): demo.zipThe text was updated successfully, but these errors were encountered: