From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 29 Oct 2009 16:50:32 +0000 (+0000)
Subject: Make it work with my next Privoxy commit.
X-Git-Tag: v_3_0_16~130
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/faq/user-manual/@default-cgi@?a=commitdiff_plain;h=db831c7f5d8f459e3eaf8ebea7e5c6250c67fc67;p=privoxy.git

Make it work with my next Privoxy commit.

Currently Privoxy's CGI pages add a space between
action names and parameters, but as far as Privoxy's
action file parser is concerned, that's invalid syntax.

I'm going to fix this and afterwards Privoxy-Regression-Test
has to work with and without the spaces.
---

diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl
index dbc79bd5..15e213d1 100755
--- a/tools/privoxy-regression-test.pl
+++ b/tools/privoxy-regression-test.pl
@@ -7,7 +7,7 @@
 # A regression test "framework" for Privoxy. For documentation see:
 # perldoc privoxy-regression-test.pl
 #
-# $Id: privoxy-regression-test.pl,v 1.57 2009/10/08 11:48:20 fabiankeil Exp $
+# $Id: privoxy-regression-test.pl,v 1.58 2009/10/29 16:46:42 fabiankeil Exp $
 #
 # Wish list:
 #
@@ -818,7 +818,10 @@ sub get_final_results ($) {
         next unless ($final_results_reached);
         last if (m@</td>@);
 
-        if (m@<br>([-+])<a.*>([^>]*)</a>(?: (\{.*\}))?@) {
+        # Privoxy versions before 3.0.16 add a space
+        # between action name and parameters, therefore
+        # the " ?".
+        if (m@<br>([-+])<a.*>([^>]*)</a>(?: ?(\{.*\}))?@) {
             my $action = $1.$2;
             my $parameter = $3;