Are your redirects HTTP compliant (absolute URI)?
Posted
by webbiedave
on Stack Overflow
See other posts from Stack Overflow
or by webbiedave
Published on 2010-06-08T20:05:21Z
Indexed on
2010/06/08
20:12 UTC
Read the original article
Hit count: 173
In the Hypertext Transfer Protocol 1.1 spec, it states for the Location header:
The field value consists of a single absolute URI.
Location = "Location" ":" absoluteURI
An example is:
Location: http://www.w3.org/pub/WWW/People.html
I have coded many an app that doesn't include the scheme and domain (i.e., /thankyou/) and every browser I've ever tested with redirects correctly. I'm wondering if it's imperative to go back and change all my redirect code or just ignore this part of the spec.
Have many of you produced code that doesn't comply and will you go back and change it? Or will you just trust that clients will continue to resolve them well into the future?
(going forward I will certainly adhere to this)
© Stack Overflow or respective owner