1 package LWP::Protocol::nogo;
2 # If you want to disable access to a particular scheme, use this
4 # LWP::Protocol::implementor(that_scheme, 'LWP::Protocol::nogo');
5 # For then on, attempts to access URLs with that scheme will generate
10 require HTTP::Response;
12 require LWP::Protocol;
13 @ISA = qw(LWP::Protocol);
16 my($self, $request) = @_;
17 my $scheme = $request->url->scheme;
19 return HTTP::Response->new(
20 &HTTP::Status::RC_INTERNAL_SERVER_ERROR,
21 "Access to \'$scheme\' URIs has been disabled"