From 5692d36bfe70f8e0d10833bb2550d998c089f58e Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 13 Dec 2020 08:33:48 +0100 Subject: [PATCH] privoxy-regression-test: Use --proxy-header when using a CGI prefix with https:// ... and a "Host:" header. --- tools/privoxy-regression-test.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index 788d7c45..2d38663f 100755 --- a/tools/privoxy-regression-test.pl +++ b/tools/privoxy-regression-test.pl @@ -1403,8 +1403,13 @@ sub get_show_request_with_curl($) { # Enable the action to test $curl_parameters .= '-H \'X-Privoxy-Control: ' . $test->{'tag'} . '\' '; - # The header to filter - $curl_parameters .= '-H \'' . $header . '\' '; + + # Add the header to filter + if ($privoxy_cgi_url =~ m@^https://@ and $header =~ m@^Host:@) { + $curl_parameters .= '--proxy-header \'' . $header . '\' '; + } else { + $curl_parameters .= '-H \'' . $header . '\' '; + } $curl_parameters .= ' '; $curl_parameters .= $privoxy_cgi_url; -- 2.39.2