X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=tools%2Fprivoxy-log-parser.pl;h=b7d73e46d6a5d07fe09ce87c5700214cd04efa62;hb=3ea70a193e1a90bd38cf01b4203e278e9743028a;hp=d685ef3b350808c76cf8aafdaea9b4b1c3d8ed45;hpb=4e29dcc957beb079816ac09583aad9ce3a25255e;p=privoxy.git diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index d685ef3b..b7d73e46 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -8,7 +8,7 @@ # # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/ # -# $Id: privoxy-log-parser.pl,v 1.153 2009/06/30 19:05:08 fk Exp $ +# $Id: privoxy-log-parser.pl,v 1.158 2009/07/14 18:39:30 fk Exp fk $ # # TODO: # - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting @@ -915,6 +915,7 @@ sub handle_loglevel_header ($) { or $c =~ m/Keeping the (?:server|client) header / or $c =~ m/Content modified with no Content-Length header set/ or $c =~ m/^Appended client IP address to/ + or $c =~ m/^Removing 'Connection: close' to imply keep-alive./ ) { # XXX: Some of these may need highlighting @@ -958,6 +959,7 @@ sub handle_loglevel_header ($) { # Keeping the client header 'Connection: keep-alive' around. The connection will be kept alive if possible. # Content modified with no Content-Length header set. Creating a fake one for adjustment later on. # Appended client IP address to X-Forwarded-For: 10.0.0.2, 10.0.0.1 + # Removing 'Connection: close' to imply keep-alive. } elsif ($c =~ m/^scanning headers for:/) { @@ -995,9 +997,10 @@ sub handle_loglevel_header ($) { # XXX: Could highlight more here. $content =~ s@(?<=^Content-Type: )(.*)(?= not replaced)@$h{'content-type'}$1$h{'Standard'}@; - } elsif ($c =~ m/^Server keep-alive timeout is/) { + } elsif ($c =~ m/^(Server|Client) keep-alive timeout is/) { # Server keep-alive timeout is 5. Sticking with 10. + # Client keep-alive timeout is 20. Sticking with 10. $content =~ s@(?<=timeout is )(\d+)@$h{'Number'}$1$h{'Standard'}@; $content =~ s@(?<=Sticking with )(\d+)@$h{'Number'}$1$h{'Standard'}@; @@ -1596,7 +1599,9 @@ sub handle_loglevel_connect ($) { $c =~ m/^Client request arrived in time or the client closed the connection/ or $c =~ m/^Complete client request received/ or $c =~ m/^Possible pipeline attempt detected./ or - $c =~ m/^POST request detected. The connection will not be kept alive./) { + $c =~ m/^POST request detected. The connection will not be kept alive./ or + $c =~ m/^The server still wants to talk, but the client hung up on us./ or + $c =~ m/^The server didn't specify how long the connection will stay open/) { # Looks like we reached the end of the last chunk. We better stop reading. # Looks like we read the end of the last chunk together with the server \ @@ -1608,6 +1613,8 @@ sub handle_loglevel_connect ($) { # Possible pipeline attempt detected. The connection will not be \ # kept alive and we will only serve the first request. # POST request detected. The connection will not be kept alive. + # The server still wants to talk, but the client hung up on us. + # The server didn't specify how long the connection will stay open. Assume it's only a second. } else {