in reply to Re^3: Changing WWW::Mechanize Request to obey ModSecurity rules
in thread Changing WWW::Mechanize Request to obey ModSecurity rules
#!/usr/bin/perl -- use strict; use warnings; use IO::Socket; my $sock = IO::Socket::INET->new ( Localhost => 'localhost', LocalPort => '18080', Proto => 'tcp', Listen => 1, ); die "cant do that: $!\n" unless $sock; print "Please contact me at: http://localhost:18080\n"; my $CRLF = "\015\012"; while(my $s = $sock->accept()){ while(<$s>){ print $s "Echo: $_"; last if /^\s+$/; } close $s; } close $sock; __END__ $ lwp-request http://localhost:18080 Echo: GET / HTTP/1.1 Echo: TE: deflate,gzip;q=0.3 Echo: Connection: TE, close Echo: Host: localhost:18080 Echo: User-Agent: lwp-request/2.06 Echo:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Changing WWW::Mechanize Request to obey ModSecurity rules
by missingthepoint (Friar) on Feb 28, 2009 at 13:20 UTC |