[pmwiki-users] Redirection from action handler
Joachim Durchholz
jo at durchholz.org
Sat Jul 2 04:44:41 CDT 2005
Patrick R. Michaud wrote:
> PmWiki has a built-in Redirect function for this:
>
> Redirect('Group.Success');
>
> It honors $EnablePathInfo and all of the other things
> you would normally expect.
Thanks.
Unfortunately, it's not exactly what I need:
1) It can delay or prevent redirection, depending on the settings of
$RedirectDelay and $EnableRedirect (what is that good for anyway? -
well, I can work around that)
2) A URL parameter of ?redirect=0 will prevent the redirection (instead,
it will simply output a single line of "Redirect to $URL"). This one is
OK by me - one might want to test the redirection mechanism itself :-)
3) I want to use a redirect code of 303 (307 might be OK too, but there
seem to be browsers that don't understand it). These codes are
specifically designed for the situation I'm in - a POST request needs to
redirect to a GET request, and the redirection itself must not be cached
(but the target URL may be, depending on its cache-control headers).
There's no way to provide a redirect code - could be easily added with
another optional parameter.
4) I'd like to see the texts that Redirect emits internationalised.
None of these problems really prevent usage, but they should be fixed
IMHO. Here's how I assess them:
1) I need to know what's the intended meaning of $RedirectDelay and
$EnableRedirect before I can assess whether the recipe should accept the
configuration or force its own idea of how the redirect should happen.
(If these variables are just there for the (:redirect ...:) markup, they
should probably become parameters of $Redirect since they won't be
needed from any other context.)
2) Nothing to do here.
3) Need a relatively short-term fix so that I can properly test whether
caching does the Right Thing.
4) Not pressing, should be done before i18n is reactivated (i.e. when
PmWiki is about to leave beta status).
Regards,
Jo
More information about the pmwiki-users
mailing list