X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=tools%2Fprivoxy-log-parser.pl;h=d2e1645b5b4f8864da256bf2cab95e56a631feab;hp=a5b0bf5c3e7996b7f3b2c1bacbb41c0587bbec80;hb=2c8cc588b08f0876e8cdf985cf192ecd58233d6c;hpb=570fbcd4b09df1eeefcf3f6ac9f432e930c73743 diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index a5b0bf5c..d2e1645b 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.143 2012/10/21 13:06:20 fabiankeil Exp $ +# $Id: privoxy-log-parser.pl,v 1.148 2012/12/20 17:03:10 fabiankeil Exp $ # # TODO: # - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting @@ -25,7 +25,7 @@ # hash key as input. # - Add --compress and --decompress options. # -# Copyright (c) 2007-2010 Fabian Keil +# Copyright (c) 2007-2012 Fabian Keil # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -1648,7 +1648,7 @@ sub handle_loglevel_connect ($) { } elsif ($c =~ m/^Waiting for the next client request/ or $c =~ m/^The connection on server socket/ or - $c =~ m/^Client request (?:\d+ )?arrived in time /) { + $c =~ m/^Client request (?:\d+ )?(?:arrived in time|has been pipelined) /) { # Waiting for the next client request on socket 3. Keeping the server \ # socket 12 to a.fsdn.com open. @@ -1659,6 +1659,7 @@ sub handle_loglevel_connect ($) { # Client request arrived in time on socket 21. # Used by earlier version: # Client request arrived in time or the client closed the connection on socket 12. + # Client request 8 has been pipelined on socket 7 and the socket is still alive. $c =~ s@(?<=request )(\d+)@$h{'Number'}$1$h{'Standard'}@; $c =~ s@(?<=on socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; @@ -1700,6 +1701,12 @@ sub handle_loglevel_connect ($) { # Waiting for up to 4999 bytes from the client. $c =~ s@(?<=up to )(\d+)@$h{'Number'}$1$h{'Standard'}@; + } elsif ($c =~ m/^Optimistically sending /) { + + # Optimistically sending 318 bytes of client headers intended for www.privoxy.org + $c =~ s@(?<=sending )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c = highlight_matched_host($c, '(?<=for )[^\s]+'); + } elsif ($c =~ m/^Stopping to watch the client socket/) { # Stopping to watch the client socket. There's already another request waiting. @@ -1718,6 +1725,12 @@ sub handle_loglevel_connect ($) { # Tainting client socket 7 due to unread data. $c =~ s@(?<=socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; + } elsif ($c =~ m/^Shifting \d+ pipelined bytes/) { + + # Shifting 360 pipelined bytes by 360 bytes + $c =~ s@(?<=Shifting )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=by )(\d+)@$h{'Number'}$1$h{'Standard'}@; + } elsif ($c =~ m/^Looks like we / or $c =~ m/^Unsetting keep-alive flag/ or $c =~ m/^No connections to wait/ or @@ -1727,6 +1740,7 @@ sub handle_loglevel_connect ($) { $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/ or $c =~ m/^There might be a request body. The connection will not be kept alive/ or + $c =~ m/^There better be a request body./ or $c =~ m/^Done reading from the client\.$/) { # Looks like we reached the end of the last chunk. We better stop reading. @@ -1744,7 +1758,9 @@ sub handle_loglevel_connect ($) { # 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. # There might be a request body. The connection will not be kept alive. - # Done reading from the client\. + # Privoxy 3.0.20 and later + # There better be a request body. + # Done reading from the client. } else {