I've run across an odd problem using Apache 1.3.6, mod_perl 1.19 and
JServ 1.0b5

        After reading Lincoln Stein and Doug MacEachern's book "Writing
Apache Modules
with Perl and C", I wrote a PerlAccessHandler which does cookie based
authentication.

        It somewhat different from the example in the book, in that I don't
use a redirect after
issuing the cookie - I just set the cookie with a headers_out(), set some
environment variables
with subprocess_env() and then return OK as a result code. The idea is that
any CGI type program
will just check the environment variables to verify that the cookie stuff
has been handled.

        This has worked fine for CGI and mod_perl type scripts. But it has
broken in a strange
way when we turn on JServ. If JServ is running, it seems that the
PerlAccessHandler is
called multiple times (I put some log->debug() statements in the handler)
for each HTTP
request. In addition, it looks like the headers set in the PerlAccessHandler
get dropped.
        Interestingly enough, the environment variables set with
subprocess_env() do get
passed through, but the variable names are prefixed with "REDIRECT_".

        Is this a known problem? I had (naively) assumed that JServ didn't
kick in until the
content handler phase, and would just pick up whatever had been set in the
earlier stages,
but it looks like it has some internal redirection going on.

        Any help will be appreciated - I will probably go back to rewrite
the AccessHandler
to use a redirect instead of taking the shortcut, but I'd appreciate if
someone could
enlighten me as to what is going on.

        Thanks,


--
Stephen Chan                    (408)364-3605  (voice)          Internet
Systems Engineering
[EMAIL PROTECTED]               (408)341-1830  (FAX)            Portera
Systems




-- --------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to