Reputation: 72001
I've got a Jetty based java app that does a relative server side redirect:
e.g. redirects to the relative url:
/page2.html
The page that's redirecting from is served over https
, but the redirect ends up being served as an http
response
https://someDomain.com/page1.html
redirects to
http://someDomain.com/page2.html
Should I be able to use a relative url or not? We have a proxy server that's doing some rewriting - is it responsible, or is this just not supported in server side redirects?
Upvotes: 0
Views: 1083
Reputation: 596397
Yes, HTTP allows a redirect to a relative URL, and it should be using the same protocol as the URL that is doing the redirect, per RFC 3986 Section 5. If Jetty or the proxy is doing something different than it is not complying with established standards.
Upvotes: 1