From: <no...@so...> - 2009-09-18 18:25:55
|
Update of /cvsroot/ijbswa/current/tools In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20583/tools Modified Files: privoxy-regression-test.pl Log Message: Cosmetics and spelling fixes for the previous commit. Index: privoxy-regression-test.pl =================================================================== RCS file: /cvsroot/ijbswa/current/tools/privoxy-regression-test.pl,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- privoxy-regression-test.pl 18 Sep 2009 17:30:59 -0000 1.52 +++ privoxy-regression-test.pl 18 Sep 2009 18:25:46 -0000 1.53 @@ -721,17 +721,16 @@ 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 @@ . "' 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 @@ 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 |