You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Chris Ochs <ch...@paymentonline.net> on 2004/02/16 07:21:20 UTC

PerlTransHandler for session id?

Our application uses apache::session as a base, using cookies if they are
supported, and the query string if not.  The application is a perl handler
and we are using the template toolkit.

To avoid having to always set the query string manually in the a href links
on all the pages, I was thinking about writing a PerlTransHandler that
manages the sessions and takes care of it automatically.  My only concern
was that the only way I see to add a query string to the url is by using a
redirect, and I'm not really sure how much of an overhead that adds in terms
of how much extra time it takes the browser to redirect to the new url.

Does that make any sense?

I'm also assuming that using pnotes is really the only alternative for
accessing the session id (created in the PerlTransHandler) in my
PerlHandler?  I really hate adding other levels of complexity, but not
having to worry about embedding the session id into the page links manually
would be a huge plus.

Also, this might be a dumb question, but could I do the redirect right from
my PerlHandler handler sub?  Otherwise I am thinking that I have to open the
dbm session file once in the PerlTransHandler to create/retreive the session
id, and then again in the PerlHandler where the session values are needed.

Thanks,

Chris


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html