Hello
$r->redirect('/other.html');
causes the HTTP headers to be sent as (at least on ApacheHandler):
HTTP/1.1 302 Found
Location: /other.html
This is in violation of the HTTP spec which says URIs need to be absolute [1].
Now, this is probably not a very big issue since at least the few major
browsers I tested support it but e.g. lynx issues a "Location URL is not
absolute" warning. I understand that I can use internal_redirect, but I prefer
my clients to have a copypastable URL at all times.
On a quick google, I found:
- Apache2::URI provides $r->construct_uri, which, unfortunately, breaks when
the relative URL doesn't start with a slash
- the 'URI' module (available on CPAN) might do proper merging [2]
[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
[2] RFC1808, section 3
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users