# -*- cperl -*-
# -----------------------------------------------------------------------------
# $Id: HTTPAntiAbuse.pm,v 1.2 2004/10/12 10:26:43 admin Exp $
# -----------------------------------------------------------------------------
package HTTPAntiAbuse;
use strict;
use warnings;
use HTTP::Status;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(unabuse);

sub unabuse ($) {
    my $resp = shift; # HTTP::Response

    if ($resp->is_success) {
	if ($resp->request->uri->as_string =~
	      m~^http://hpad\.www\.infoseek\.co\.jp/FhpE\?sv=FE&pg=FhpE_(\d{3})\.html$~) {
	    # iswebのリダイレクトAbuse
	    $resp->code($1);
	    $resp->message(status_message($1));
	}
    }
}

1;
