Reputation: 7706
For an http redirection, say a 302, is it mandatory to return the full url of the new page, including http://
or is it possible to only send a relative address to the root url, like /my/view
?
I tried to read rfc 2616 at https://www.rfc-editor.org/rfc/rfc2616#section-10.3.3 but could find anything explicit.
Also, are there known browsers bugs regarding this ?
Upvotes: 0
Views: 90
Reputation: 42025
Actually, RFC 2616 is clear in that it needs to be a full URI (by citing the relevant ABNF production from the URI spec).
That being said, this is nowadays considered a bug, and the next revision of HTTP will allow relative references. And yes, browsers support those.
Upvotes: 1