@ResponseStatus annotation is ignored in an @Controller redirect (RedirectView) [SPR-6144] #10812
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Flyin Wolf opened SPR-6144 and commented
In a controller that returns a RedirectView or "redirect:someViewName" the
@ResponseStatus
annotation is ignored. RedirectView always returns a hard coded 303 (or 302) in spite of the given value in the@ResponseStatus
annotation.i.e.
@
Got:
Expected:
I notice this could also maybe solve - http://jira.springframework.org/browse/SPR-5468
RedirectView.sendRedirect(...) could look something like this:
Extending RedirectView works for me, but of course "redirect:something.html" would not work without also changing the class instantiated when "redirect:" is used. But again, as is, it does give unexpected behaviour.
Affects: 3.0 M4
Issue Links:
@ResponseStatus
with RedirectViewReferenced from: commits 5b12503
The text was updated successfully, but these errors were encountered: