[Templates] Apache::Template and persistant pnotes across internal_redirects

Rick Myers rik@sumthin.nu
Mon, 18 Mar 2002 20:43:22 -0500


On Mar 18, 2002 at 08:08:10 -0500, darren chamberlain wrote:
> Quoting Rick Myers <rik@sumthin.nu> [Mar 17, 2002 18:45]:
> > 
> > $params->{ uri } = $request->subprocess_env('REDIRECT_URL') || $request->uri()
> >     if $all or $plist->{ uri };
> > 
> > It just looked like to me that someone else had the idea of
> > supporting redirects, but only added the one bit they needed
> > at the time.
> 
> That was me.  IIRC, this is because mod_dir will redirect
> requests for /something/ /something/index.html (or whatever
> DirectoryIndex is set to) and the actual requested URI is in
> REDIRECT_URL.

Interestingly, mod_perl also sets REDIRECT_URL, so your code
works even in my hacked up scenario.

Having said that though, I realize the original point of
this thread is pretty much moot. Redirects can come from
anywhere, so it's going to be impossible to say which set of
pnotes to use. Plus, just looking for pnotes creates them.
(Erm, an empty pnotes table, at least.)

--rick
Always begin with h2xs.
Always begin with h2xs!
ALWAYS BEGIN WITH H2XS!