projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
privoxy-regression-test: Use --proxy-header when using a CGI prefix with https://
[privoxy.git]
/
tools
/
privoxy-regression-test.pl
diff --git
a/tools/privoxy-regression-test.pl
b/tools/privoxy-regression-test.pl
index
6f342ba
..
2d38663
100755
(executable)
--- a/
tools/privoxy-regression-test.pl
+++ b/
tools/privoxy-regression-test.pl
@@
-132,7
+132,7
@@
sub parse_tag($) {
sub check_for_forbidden_characters($) {
my $string = shift;
sub check_for_forbidden_characters($) {
my $string = shift;
- my $allowed = '[-=\dA-Za-z~{}\[\]:./();\t ,+@"_%?&*^]';
+ my $allowed = '[-=\dA-Za-z~{}\[\]:./();\t ,+@"_%?&*^
|
]';
unless ($string =~ m/^$allowed*$/o) {
my $forbidden = $string;
unless ($string =~ m/^$allowed*$/o) {
my $forbidden = $string;
@@
-1370,7
+1370,7
@@
sub get_cgi_page_or_else($) {
if (200 != $status_code) {
if (200 != $status_code) {
- my $log_message = "Failed to fetch Privoxy CGI
Page
. " .
+ my $log_message = "Failed to fetch Privoxy CGI
page '$cgi_url'
. " .
"Received status code ". $status_code .
" while only 200 is acceptable.";
"Received status code ". $status_code .
" while only 200 is acceptable.";
@@
-1403,8
+1403,13
@@
sub get_show_request_with_curl($) {
# Enable the action to test
$curl_parameters .= '-H \'X-Privoxy-Control: ' . $test->{'tag'} . '\' ';
# 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;
$curl_parameters .= ' ';
$curl_parameters .= $privoxy_cgi_url;