I have some code working, but I'm curious as to why it has to work in the
way it does.  The code:

package My::TAMU;

sub handler ($$) {
  my $class = shift;
  my $r = shift;

  if($r->current_callback eq "PerlHandler" ||  # this one makes sense
     $r->current_callback eq "PerlFixupHandler") { # but why this one?
    $class .= "::Server";
    return $class->handler($r);
  } elsif($r->current_callback eq "PerlAccessHandler") {
    $class .= "::Client";
    return $class->handler($r);
  } else {
    return DECLINED;
  }
}

In the httpd.conf file, the following:
  <Location "/TicketAuth/">
    PerlAccessHandler My::TAMU
    PerlSetVar        TM_Domain .tamu.edu
    ErrorDocument     403 http://hex.tamu.edu/TicketMaster/
  </Location>

  <Location "/TicketMaster">
    SetHandler perl-script
    PerlHandler My::TAMU
    PerlSetVar  TM_Domain         .tamu.edu
    PerlSetVar  TM_Expiration      900
    PerlSendHeader On
  </Location>

My question is why does the My::TAMU->handler get called as a 
PerlFixupHandler when it is an error document but as a PerlHandler 
when a normal document?

GET /TicketAuth/ : PerlAccessHandler bounces browser to /TicketMaster/
                   which is called as a PerlFixupHandler.
POST /TicketMaster/ : PerlHandler (filled out form, now logging in)

The code works, so I'm not looking for a fix.  I couldn't find anything
in the eagle book that would clue me in.  My only guess at this point is
that error documents are handled in the Fixup phase somehow.  The only
problem with this is internal error docs are being handled slightly
differently than external ones other than the internal being a sub-request
possibly.
--
James Smith <[EMAIL PROTECTED]>, 409-862-3725
Texas A&M CIS Operating Systems Group, Unix

Reply via email to