From: Fabian Keil Date: Tue, 8 Feb 2022 12:22:11 +0000 (+0100) Subject: Add test scenario blocked-https-requests X-Git-Url: http://www.privoxy.org/gitweb/contact.html?p=privoxy.git;a=commitdiff_plain;h=346132dd243585f57b0255310449f95619ba0c8b Add test scenario blocked-https-requests Sponsored by: Privoxy project funds collected at SPI --- diff --git a/tests/cts/blocked-https-requests/data/test1 b/tests/cts/blocked-https-requests/data/test1 new file mode 100644 index 00000000..b5e2140f --- /dev/null +++ b/tests/cts/blocked-https-requests/data/test1 @@ -0,0 +1,58 @@ + + + +HTTPS +HTTP GET + + + + + +HTTP/1.1 200 OK +Connection: close +Content-Type: text/html +Content-Length: 18 + +Here's your data. + + + + + +HTTP/1.1 200 Connection established + +HTTP/1.1 200 OK +Connection: close +Content-Type: text/html +Content-Length: 18 + +Here's your data. + + + + + +https + + +Blocked https request followed by unblocked request for the same host which means the connection can't be reused + + +--insecure -s --write-out '%{stderr}%{response_code}\n' https://%HOSTIP:%HTTPSPORT/ads/%TESTNUMBER --output log/curl1.out https://%HOSTIP:%HTTPSPORT/%TESTNUMBER + + + + + +GET /%TESTNUMBER HTTP/1.1 +Host: %HOSTIP:%HTTPSPORT +User-Agent: curl/%VERSION +Accept: */* + + + +403 +200 + + + diff --git a/tests/cts/blocked-https-requests/https-inspection.action b/tests/cts/blocked-https-requests/https-inspection.action new file mode 100644 index 00000000..01b2181d --- /dev/null +++ b/tests/cts/blocked-https-requests/https-inspection.action @@ -0,0 +1,2 @@ +{+https-inspection +ignore-certificate-errors} +/ diff --git a/tests/cts/blocked-https-requests/privoxy.conf b/tests/cts/blocked-https-requests/privoxy.conf new file mode 100644 index 00000000..fb2304aa --- /dev/null +++ b/tests/cts/blocked-https-requests/privoxy.conf @@ -0,0 +1,31 @@ +listen-address 127.0.0.1:9119 + +ca-directory ../ca-directory +ca-cert-file privoxy-test-cacert.crt +ca-key-file privoxy-test-cakey.pem +ca-password blafasel +# We don't check certificate anyway +trusted-cas-file privoxy-test-cacert.crt + +certificate-directory ../certs + +debug 1 # Log the destination for each request Privoxy let through. See also debug 1024. +debug 2 # show each connection status +debug 4 # show tagging-related messages +debug 8 # show header parsing +debug 32 # debug force feature +debug 64 # debug regular expression filters +debug 128 # debug redirects +debug 256 # debug GIF de-animation +debug 512 # Common Log Format +debug 1024 # Log the destination for requests Privoxy didn't let through, and the reason why. +debug 4096 # Startup banner and warnings. +debug 8192 # Non-fatal errors + +actionsfile https-inspection.action +actionsfile ../../../default.action.master +filterfile ../../../default.filter + +templdir ../../../templates + +keep-alive-timeout 15