0

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 ?

Community
  • 1
  • 1
ascobol
  • 7,554
  • 7
  • 49
  • 70

1 Answers1

1

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.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98