61 lines
2.7 KiB
Perl
61 lines
2.7 KiB
Perl
package WebGUI::URL::Snoop;
|
|
|
|
=head1 LEGAL
|
|
|
|
-------------------------------------------------------------------
|
|
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
|
-------------------------------------------------------------------
|
|
Please read the legal notices (docs/legal.txt) and the license
|
|
(docs/license.txt) that came with this distribution before using
|
|
this software.
|
|
-------------------------------------------------------------------
|
|
http://www.plainblack.com info@plainblack.com
|
|
-------------------------------------------------------------------
|
|
|
|
=cut
|
|
|
|
use strict;
|
|
use Apache2::Const -compile => qw(OK DECLINED);
|
|
use WebGUI::Session;
|
|
|
|
=head1 NAME
|
|
|
|
Package WebGUI::URL::Snoop
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
A URL handler that should never be called.
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
use WebGUI::URL::Snoop;
|
|
my $status = WebGUI::URL::Snoop::handler($r, $configFile);
|
|
|
|
=head1 SUBROUTINES
|
|
|
|
These subroutines are available from this package:
|
|
|
|
=cut
|
|
|
|
#-------------------------------------------------------------------
|
|
|
|
=head2 handler ( request, configFile )
|
|
|
|
The Apache request handler for this package.
|
|
|
|
=cut
|
|
|
|
sub handler {
|
|
my ($request, $server, $config) = @_;
|
|
$request->content_type("text/html");
|
|
$request->push_handlers(PerlResponseHandler => sub {
|
|
$request->print(q|<html><head><title>Snoopy</title></head><body><div style="width: 600px; padding: 200px;">Why would you type in this URL? Really. What were you expecting to see here? You really need to get a life. Are you still here? Seriously, you need to go do something else. I think your boss is calling.</div></body></html>|);
|
|
return Apache2::Const::OK;
|
|
} );
|
|
$request->push_handlers(PerlTransHandler => sub { return Apache2::Const::OK });
|
|
return Apache2::Const::OK;
|
|
}
|
|
|
|
|
|
1;
|
|
|