Loading ...
Sorry, an error occurred while loading the content.

1179Re: ASP-Object in PerlAuth Handler

Expand Messages
  • Josh Chamas
    May 6, 2003
    • 0 Attachment
      Dr. Helmut Zeilinger wrote:
      > I took your idea of reusing or keeping the ASP object, which was created
      > by a
      > previous perl handler, during the whole request.
      > Something like the following SEEMS to work (only a few tests!):
      > Code in a previous handler (eg. PerlAuthenHandler):
      > [..]
      > #Create the ASP object
      > my $ASP = Apache::ASP::new('Apache::ASP', $r, $r->filename);
      > #Put it in $r->pnotes for reuse in the ResponseHandler
      > $r->pnotes ('Apache::ASP'=> $ASP);
      > [..]

      I have thought of automating this before. Would something like
      a configuration directive be appropriate like:

      PerlSetVar ASPRequestSingleton 1

      When set it would allow for caching & reusing of a single ASP object
      across request stages. This allows things like $Request, $Session, etc.
      to only be created once. Might the 1 instead be instead by Name, like

      PerlSetVar ASPRequestSingleton SomeName

      so one could have multiple tracks of ASP objects concurrently?
      A typical setting of 1 would simply be that cache name.

      This would effective restore a cached ASP object like your code
      has done across stages.

      Any suggestions on this feature? Does this need to be more flexible,
      or are there things not considered here? I would worry about someone
      creating such an object in an early stage, then changing the filename
      of the current request during a URI translation phase, and then having
      to deal with an old ASP object that was pointing to the wrong file.
      In fact, in an early enough Apache request stage, there may not even
      be a valid file that the ASP object would reference, so what then?


      Josh Chamas, Founder phone:925-552-0128
      Chamas Enterprises Inc. http://www.chamas.com
      NodeWorks Link Checking http://www.nodeworks.com

      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Show all 7 messages in this topic