Feature Proposal: TWiki::Func::redirectCgiQuery and TWiki::redirect support $viaCache parameter.
Motivation
Make TWiki::Func::redirectCgiQuery and TWiki::redirect supporting $viaCache parameter to forcibly cache a redirect
CGI query.
Description and Documentation
Add $viaCache parameter in TWiki::Func::redirectCgiQuery sub redirectCgiQuery { my( $query, $url, $passthru, $viaCache ) =
@_
; ... }
Add $viaCache parameter in TWiki::redirect sub redirect { my( $this, $url, $passthru, $viaCache ) =
@_
; .... if ($ENV{REQUEST_METHOD} eq 'POST' || $viaCache ) { # Redirecting from a port to a get my $cache = $this->cacheQuery(); .... }
Examples
Impact
Implementation
--
Contributors: YaojunFei - 2012-11-20
Discussion
What is the use case?
--
PeterThoeny - 2012-11-21
We can prettify a redirected URL. For example, when using
SendEmailPlugin, user might invoke "sendemail" addon with a "GET" url like this:
http://kd197c1n5.ms.com:10014/cgi-bin/sendemail?to=xxx&subject=xxx&body=xxx&redirect=xxxxxxxxx
. In such case, we can make "SendEmailPlugin" always redirecting to a prettified URL without those params for sending email.
--
YaojunFei - 2012-11-28