I'd like to preserve pnotes across redirects.  What kind of redirects?
I'm not sure...the kind that happens when a request for a directory is
made and directory indexing is turned off.  Example:

Document root on test.com:

    /floor/
           index.html

index.html contains a simple HTML page that says "hello."

* PerlTrans handler: chops off first path part and saves it in
  pnotes('room').

* PerlHandler for /floor/: prints the contents of the requested file
  with the value of pnotes('room') inserted into it somewhere.

Request for:

    http://test.com/kitchen/floor/index.html

This works as expected.  The file <doc root>/floor/index.html is
shown with the word "kitchen" inserted into it.

But a request for:

    http://test.com/kitchen/floor

or

    http://test.com/kitchen/floor/

gives me index.html with an empty string inserted.  That is, by the
time the request gets to /floor/'s PerlHandler, the old pnotes() set
by the PerlTransHandler are long gone.

How do I prevent this?  I considered letting the PerlHandler tack on
"index.html" if it gets any requests for directory indexes, but that
seems very kludgy.  What is the process by which apache redirects
from directory index requests to an actual "index.html" type of
file path (assuming one exists), and why is pnotes() lost during this
process?  How can I handle such URLs when I have both a PerlTransHandler
that modifies the URI and a PerlHandler content handler that expects to
know what the PerTrans handler removed?

-John

Reply via email to