Affects: 5.2.2, 5.2.1
To reproduce:
- Create a ServerSentEventHttpMessageReader with a decoder that has maxInMemorySize > 256k.
- Call either read or readMono with 256k < len(message body) <= maxInMemorySize
- DataBufferLimitException is thrown
Expected: - The configured buffer limit is applied and not error is thrown
The problem is that while the data decoder passed to ServerSentEventHttpMessageReader is properly configured to support a larger maxInMemorySize, that decoder is only used to decode the data part of the message. Prior to that, the SSE's body is decoded through a different decoder (private static final StringDecoder stringDecoder = StringDecoder.textPlainOnly()) which is not properly configured - nore is it accessible in any way - with the new limit.
Note that to my understanding, prior to 5.2.0 there was no limit at all imposed to the body. Now there is one (see 89d053d7 by @rstoyanchev) , but we have no way to adjust it.
Comment From: OLPMO
Could you provide a minimal demo that can reproduce the problem? @jacqueslemire