[Privoxy-commits] [privoxy] 29/41: Add test scenario blocked-https-requests
User Git
git at git.privoxy.org
Wed Mar 20 12:39:06 CET 2024
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 346132dd243585f57b0255310449f95619ba0c8b
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Feb 8 13:22:11 2022 +0100
Add test scenario blocked-https-requests
Sponsored by: Privoxy project funds collected at SPI
---
tests/cts/blocked-https-requests/data/test1 | 58 ++++++++++++++++++++++
.../blocked-https-requests/https-inspection.action | 2 +
tests/cts/blocked-https-requests/privoxy.conf | 31 ++++++++++++
3 files changed, 91 insertions(+)
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 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/html
+Content-Length: 18
+
+Here's your data.
+</data>
+</reply>
+
+<proxy-reply>
+<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.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Blocked https request followed by unblocked request for the same host which means the connection can't be reused
+</name>
+<command>
+--insecure -s --write-out '%{stderr}%{response_code}\n' https://%HOSTIP:%HTTPSPORT/ads/%TESTNUMBER --output log/curl1.out https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPSPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol>
+<stderr>
+403
+200
+</stderr>
+</verify>
+</testcase>
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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list