perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DJ \(David J Radunz\)">
Subject Re: ErrorDocument 401 problem..
Date Mon, 10 Dec 2001 18:34:05 GMT

    How i expected the ErrorDocument directive to behave was as follows:
WHEN there was an error 401 (ie the user had logged in 3 times and failed)
there would be an error page shown (in this case it would be /error/401).
But instead what seems to be happening as soon as a user goes to an
authorisation required area they are just displayed the errordocument page
right away without even being asked to login, forgive me if im wrong but
this surely means the ErrorDocument handler is behaving in a non-standard
way with mod-perl as opposed to using static pages as error urls. I have
included the module, its only small and ive cut out some of the useless code
to keep it short.

httpd.conf extract:

ErrorDocument 401 /error/401

PerlModule Apache::ErrorControl

<Location /error>
        SetHandler perl-script
        PerlHandler Apache::ErrorControl
        PerlSetVar DefaultForm /www/base/conf/defaulterror

Apache::ErrorControl extract:

sub handler {
        my $r = shift;

        my $file = $r->filename;
        my $uri = $r->uri;

        #using $uri return the html the client expected to see...


So there really isnt alot to it, i mean sure the actual modules alot
bigger.. but the above is the barebones of how i want it to work.. just not
sure why its treated differently, and how to fix it.


----- Original Message -----
From: "Richard L. Goerwitz III" <>
To: "DJ (David J Radunz)" <>
Cc: <>
Sent: Monday, December 10, 2001 11:49 PM
Subject: Re: ErrorDocument 401 problem..

> "DJ (David J Radunz)" wrote:
> >     I have written a perl module called Apache::ErrorControl which I am
> > using to control the output of error messages from the server, and allow
> > users to have custom error pages etc...
> You might want to re-think how you have this set up.
> I don't know how exactly you have your module coded, but just out
> of curiosity, is the user seeing a 401 response code - or a 200 res-
> ponse code?  Or something else?  If the user isn't seeing the 401
> response code, there's not going to be any opportunity for him or
> her to authenticate.
> --
> Richard Goerwitz                               richard@Goerwitz.COM
> tel: 401 438 8978

View raw message