#!/usr/bin/perl -w package MyHTTP; use base qw(LWP::Protocol::http); sub _new_socket { my $self=shift; my $ret =$self->SUPER::_new_socket(@_); $ret->max_header_lines(1000); return $ret; } package MyHTTP::Socket; use vars qw(@ISA); @ISA = qw(LWP::Protocol::http::SocketMethods Net::HTTP); package main; LWP::Protocol::implementor( 'http', 'MyHTTP' ); use LWP::Simple qw( getprint ); getprint( shift || 'http://localhost/' ); exit 0; __END__