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
Problem: When I use RenderingResponse.create("redirect:/controller").status(HttpStatus.FOUND).build(), the response status is not modified (remains 303 See Other no matter what).
(.status(something) works fine on a non-redirect view: RenderingResponse.create("template").status(something).build().)
Expected Behavior: When I modify the status of a "redirect view", I expect the status to be as directed in the invocation.
Actual Behavior: The redirect works fine. However, its status is 303 See Other no matter what I set it to.
poutsma
changed the title
.status(HttpStatus) ignored on RenderingResponse.create("redirect:/somewhere").status(...)
RenderingResponse does not set status code on redirect views
Aug 30, 2022
Version:
org.springframework:spring-webflux:5.3.21
Problem: When I use
RenderingResponse.create("redirect:/controller").status(HttpStatus.FOUND).build()
, the response status is not modified (remains303 See Other
no matter what).(
.status(something)
works fine on a non-redirect view:RenderingResponse.create("template").status(something).build()
.)Expected Behavior: When I modify the status of a "redirect view", I expect the status to be as directed in the invocation.
Actual Behavior: The redirect works fine. However, its status is
303 See Other
no matter what I set it to.I have a router:
and a controller:
The text was updated successfully, but these errors were encountered: