Maybe I was not clear enough.
HttpServletResponse#sendRedirect() is supposed to set the Location header,
i.e. Tomcat/Jetty.

The other status codes do it manually because #sendRedirect() would
override the status code.

IMO you should ask at Tomcat forums why the Location is not being set.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Oct 6, 2017 at 4:10 PM, Maxim Solodovnik <solomax...@gmail.com>
wrote:

> This code:
> https://github.com/apache/wicket/blob/master/wicket-
> request/src/main/java/org/apache/wicket/request/http/handler/
> RedirectRequestHandler.java
>
> Has special handling of moved temporary
>
> WBR, Maxim
> (from mobile, sorry for the typos)
>
> On Oct 6, 2017 20:05, "Maxim Solodovnik" <solomax...@gmail.com> wrote:
>
> > The status is being set correctly, Location is not being set :(
> >
> > WBR, Maxim
> > (from mobile, sorry for the typos)
> >
> > On Oct 6, 2017 20:04, "Martin Grigorov" <mgrigo...@apache.org> wrote:
> >
> >> Hi,
> >>
> >> Isn't this something that the web container should do for us ?
> >>
> >> javax.servlet.http.HttpServletResponse#sendRedirect() sets the status
> to
> >> 302, that's the reason why the others do it "manually".
> >>
> >> Martin Grigorov
> >> Wicket Training and Consulting
> >> https://twitter.com/mtgrigorov
> >>
> >> On Fri, Oct 6, 2017 at 2:18 PM, Maxim Solodovnik <solomax...@gmail.com>
> >> wrote:
> >>
> >> > Hello All,
> >> >
> >> > Recently I found RedirectToUrlException is not working in FF (works in
> >> > Chrome)
> >> > Redirect URL is being displayed for microsecond, then page is just
> >> > being refreshed
> >> >
> >> > What I found during debugging:
> >> > In case code is SC_MOVED_TEMPORARILY Location header is not set.
> >> >
> >> > FF site [1] clearly states Location should be set
> >> >
> >> > Tested on master branch.
> >> >
> >> > Should I prepare PR or this is done on purpose?
> >> >
> >> > [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302
> >> >
> >> > --
> >> > WBR
> >> > Maxim aka solomax
> >> >
> >>
> >
>

Reply via email to