From 6773cf153fcbf33b7415172d75a4ad004712db7f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 18 Sep 2009 18:25:46 +0000 Subject: [PATCH] Cosmetics and spelling fixes for the previous commit. --- tools/privoxy-regression-test.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index 7e25cc95..b2d16f51 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.191 2009/09/14 16:47:49 fk Exp $ +# $Id: privoxy-regression-test.pl,v 1.52 2009/09/18 17:30:59 fabiankeil Exp $ # # Wish list: # @@ -721,17 +721,16 @@ sub execute_redirect_test ($) { my $test = shift; my $buffer_ref; my $status_code; + my $curl_parameters; - my $curl_parameters = ''; + my $redirect_destination = 'NONE'; my $url = $test->{'data'}; - my $redirect_destination; my $expected_redirect_destination = $test->{'redirect destination'}; - # XXX: Check if a redirect actualy applies before doing the request. - # otherwise the test may hit a real server in failure cases. - - $curl_parameters .= '--head '; + # XXX: Verify that a redirect applies before actually doing the request. + # Otherwise the test may hit a real server in failure cases. + $curl_parameters = '--head '; $curl_parameters .= quote($url); $buffer_ref = get_page_with_curl($curl_parameters); @@ -743,6 +742,7 @@ sub execute_redirect_test ($) { . "' but got a response with status code: " . $status_code); return 0; } + foreach (@{$buffer_ref}) { if (/^Location: (.*)\r\n/) { $redirect_destination = $1; @@ -1674,7 +1674,7 @@ header to a trusted value. If no explicit status code expectation is set, B<200> is used. -To verify that a URL is blocked, use: +To verify that an URL is blocked, use: # Blocked URL = http://www.example.com/blocked -- 2.39.2