Gerald Richter wrote:
>
> Hi Greg,
> >
> > As far as I am aware (please someone prove me wrong!) the does not
> > appear to be such a module.
> >
>
> I meant the module your are about to write :-)
>
> >
> > Please send me ideas / thoughs and I'll have a go.
> >
>
> Embperl currently goes the way that it sets up a tied hash at load time (so
> it only has to be done once) and monitor wherever somebody is writing to
> this hash. Only in the case that a element of the hash is modified, Embperl
> generates a session id (actually Apache::Session does it) and sends the
> cookie to the browser. Therefore I don't have to configure anything to use
> session management (of course you can configure several parameteress, like
> cookie domain etc.), because if the page stores some data in the hash,
> session management is enabled in all other cases it isn't used. That make
> session management as transparanet as possible for the programmer. When a
> new request starts, Embperl checks if there is a session id send in a cookie
So therefore would it not be easy to modify your code to check for a
pnotes entry called session and cookies ?
If session is set then use that.
If cookie is set (ie 1) then assume cookies are on! else if you have a
session and cookies are off then rewrite your urls to include the
session ID ?
> from the browser and tells Apache::Session to restore the data in the
> session hash.
>
> This shema may not work, with session id in the url, because you need to do
> the redirect before the page is executed. Because Embperl anyways parses the
> page, it would be no overhead to rewrite all hrefs (and other urls) on the
> fly. I have not thought very much about, what is the best way to go here.
Ok - remeber that the URI transhandler stage is before nearly all the
others - hence a redirect should work.
If the session ID is in the uri I rewrite the uri to exclude it thus:
www.foo.com/123234345356/index.pl
would get rewritten to:
www.foo.com/index.pl
and
123234345356 would get put into a pnotes entry called session and
cookie_on would be set to O!
If the redirect needs to happen then the emb perl page would never be
executed until after the redirect as the embperl handler is after the
transhandler stage - or have I got emb perl completely wrong ?
>
> This should give you a short impression what Embperl does, now we have to
> think about how we can bring this together with a general module.
Unless you can see nothing wrong with the above I should be able to put
something basic together over the next few days ... documentation may be
a bit lacking mind ...
Is the pnotes issue OK ? or should we use an Environment Variable to
transfere the data between handlers ?
What other issue do you have ?
Greg
>
> Gerald
>
> -------------------------------------------------------------
> Gerald Richter ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
>
> Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: [EMAIL PROTECTED] Voice: +49 6133 925151
> WWW: http://www.ecos.de Fax: +49 6133 925152
> -------------------------------------------------------------