in reply to Re: Changing WWW::Mechanize Request to obey ModSecurity rules
in thread Changing WWW::Mechanize Request to obey ModSecurity rules

I was basing it on something like this:

my $response = $mech->get($location); print "REQUEST: \n" . $response->request->as_string ." --REQUEST\n";
It looks like you're right about it being different, which makes things a bit more difficult.

Normally I'd use wireshark to look at this, but I'm not really a network admin and I'm not sure if there's a way to look directly at the wire and decrypt the SSL content.

Replies are listed 'Best First'.
Re^3: Changing WWW::Mechanize Request to obey ModSecurity rules
by ikegami (Patriarch) on Feb 26, 2009 at 14:43 UTC
    Create a little program that creates a server socket, accepts a connection, and dumps the incoming data. Connect to that instead of a real HTTP server.
      Here you go, shows everything is as it should be :)
      #!/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:
        $ nc -vv -l -p 18080

        That that is is that that is not is not