diff options
author | Yorhel <git@yorhel.nl> | 2017-12-26 13:26:48 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2017-12-26 13:26:50 +0100 |
commit | 3f40da291c90553aa9ddc05f28afab1404d1aa75 (patch) | |
tree | 5e4d7aea623f174135b33364b45732f4a64f2431 /lib/TUWF/Response.pod | |
parent | 0297bc628344618eecf773fc2f65c44b5f531cff (diff) |
TUWF::Response: Set relative Location in resRedirect()
This fixes redirects in the scenario where the reqBaseURI() is not
correct, which may happen if there is a HTTPS-terminating proxy in
between that TUWF is not aware if (i.e. reqProtocol() is wrong) or when
the site is running on a non-standard port and this is not reflected in
reqHost().
I've always found the absolute Location header a silly requirement, so
I'm glad that RFC 7231 now allows a relative URI.
Diffstat (limited to 'lib/TUWF/Response.pod')
-rw-r--r-- | lib/TUWF/Response.pod | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/TUWF/Response.pod b/lib/TUWF/Response.pod index 20d8261..fab404c 100644 --- a/lib/TUWF/Response.pod +++ b/lib/TUWF/Response.pod @@ -161,8 +161,8 @@ Gets or sets the numeric HTTP response status code. =head2 resRedirect(location, type) -Generate a HTTP redirect to I<location>, which should be a path relative to the -domain, including leading a slash. If I<type> is not defined, a 301 (Moved +Generate a HTTP redirect to I<location>, which should be an absolute URL or a +path relative to the current domain. If I<type> is not defined, a 301 (Moved Permanently) is used. If I<type> is 'temp', a 307 (Temporary Redirect) or if I<type> is 'post' a 303 (See Other) status code is used. The latter is recommended for use as response to a POST request, as it explicitely tells the |