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

1188Re: ASP-Object in PerlAuth Handler

Expand Messages
  • Josh Chamas
    May 7, 2003
    • 0 Attachment
      Dr. Helmut Zeilinger wrote:
      > 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
      > seems
      > to be so, that only sometimes the POST data are fetched in the previous
      > handler (???)

      That is odd. I tend not to trust %ENV setup in other stages myself, and
      to this effect, I will try to move away from using %ENV in the core Apache::ASP
      for consistent behavior in earlier stages, and instead rely on other things
      that are explicit like client HTTP headers.

      > For now i am using your workaround
      > sub My::Auth::handler {
      > local $ENV{CONTENT_LENGTH} = 0;
      > my $ASP = Apache::ASP->new($r);

      How about we create an explicit configration setting for this like:

      sub My::Auth::handler {
      $r->dir_config('RequestBinaryRead', 'Off);
      my $ASP = Apache::ASP->new($r);
      $r->dir_config('RequestBinaryRead', 'On');

      My only concern is that the %ENV hack may go away one day as it relies
      on internal implementation. But if we wrap an explicit config around
      it, I can make this work going forward. I thought about the caching
      of Request or ASP objects, but that seems too messy to get right for now,
      so I'd rather deal with the specific problem of handling POST data.

      I might also be able to set the default for this value to be On only
      for the PerlHandler / PerlResponseHandler, whereas other mod_perl callback
      stages will have this turned off by default, so for you then it would
      just work without explicitly setting the config. I think this would make
      the most intuitive sense, to have POST data only read during a PerlHandler
      phase unless explicitly configured otherwise.

      What do you think?


      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