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

1186Re: ASP-Object in PerlAuth Handler

Expand Messages
  • Dr. Helmut Zeilinger
    May 7, 2003

      further testing let me come to the result, that setting up the
      asp object in an earlier apache phase does not work correctly. The
      reason is, that the %ENV hash seems to be filled through the single
      phases. For example in the PerlAuthen phase the only keys of %ENV are

      Because you make use of this hash during the object creation, it probably
      might not work correctly.

      One might argue, that if there is no CONTENT_LENGTH, the request POST data
      are also not fetched, and so my original problem does not exist. But it
      to be so, that only sometimes the POST data are fetched in the previous
      handler (???)

      Anyway, what i was originally intending was the creation of the Session
      in the Authen phase to check if the user has as valid session key. It would
      of course be
      nice to get the Session object "alone" without the price of setting up the
      ASP object.

      For now i am using your workaround

      sub My::Auth::handler {
      local $ENV{CONTENT_LENGTH} = 0;
      my $ASP = Apache::ASP->new($r);

      to ensure, that the POST data are not fetched (=lost).

      I keep thinking about this.

      Thank You!


      > 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?

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