Does an HTTP redirect need a complete URL?
Frage
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 http://tools.ietf.org/html/rfc2616#section-10.3.3 but could find anything explicit.
Also, are there known browsers bugs regarding this ?
Lösung
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.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow