You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've turned it into an improvement, since it is by design that the filter reads the body. Typically that wouldn't be an issue with annotated controllers nor functional endpoints where form data is read via ServerWebExchange#getFormData which is cached. However, it's clear there are use cases like Spring Cloud Gateway where the raw request body might need to be read.
After further thought, I've decided to leave this as is, and document the need for consistent access to the parsed form data through the ServerWebExchange. The alternative of caching both the raw and the parsed content is not ideal.
For the much less common case where the raw form data might still be needed, the FormHttpMessageWriter could be used to do encode the parsed form data back into serialized form.
Spencer Gibb opened SPR-17291 and commented
Either
@RequestBody
or other subscription (such as spring-cloud-gateway)See also spring-projects/spring-boot#14520
Affects: 5.0.9
Reference URL: spring-cloud/spring-cloud-gateway#541
Issue Links:
Referenced from: commits 9630445
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: