Add test scenario chunked-transfer-encoding-https
authorFabian Keil <fk@fabiankeil.de>
Wed, 10 Mar 2021 15:05:04 +0000 (16:05 +0100)
committerFabian Keil <fk@fabiankeil.de>
Wed, 20 Mar 2024 11:38:39 +0000 (12:38 +0100)
Sponsored by: Privoxy project funds collected at SPI

24 files changed:
tests/cts/chunked-transfer-encoding-https/chunked-transfer-encoding.action [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test1 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test10 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test11 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test12 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test13 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test14 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test15 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test16 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test17 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test18 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test19 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test2 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test20 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test21 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test22 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test3 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test4 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test5 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test6 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test7 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test8 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/data/test9 [new file with mode: 0644]
tests/cts/chunked-transfer-encoding-https/privoxy.conf [new file with mode: 0644]

diff --git a/tests/cts/chunked-transfer-encoding-https/chunked-transfer-encoding.action b/tests/cts/chunked-transfer-encoding-https/chunked-transfer-encoding.action
new file mode 100644 (file)
index 0000000..efb0b96
--- /dev/null
@@ -0,0 +1,5 @@
+{+https-inspection +ignore-certificate-errors}
+/
+
+{+filter{img-reorder}}
+/chunked-transfer-encoding/
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test1 b/tests/cts/chunked-transfer-encoding-https/data/test1
new file mode 100644 (file)
index 0000000..9c2331b
--- /dev/null
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+6\r
+AAAAA
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+AAAAA
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - One chunk delivered through https.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test10 b/tests/cts/chunked-transfer-encoding-https/data/test10
new file mode 100644 (file)
index 0000000..34515ac
--- /dev/null
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+Bogus data.\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+Bogus data.\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, bogus data instead of last chunk.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+18
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test11 b/tests/cts/chunked-transfer-encoding-https/data/test11
new file mode 100644 (file)
index 0000000..cbed307
--- /dev/null
@@ -0,0 +1,85 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+100\r
+%repeat[1000 x D]%
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+100\r
+%repeat[1000 x D]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, chunk at the end too big.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+56
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test12 b/tests/cts/chunked-transfer-encoding-https/data/test12
new file mode 100644 (file)
index 0000000..aa089ec
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+100\r
+%repeat[255 x 0]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%repeat[255 x A]%
+%repeat[255 x B]%
+%repeat[255 x C]%
+%repeat[255 x 0]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, chunk at the end contains zeros but is valid
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test13 b/tests/cts/chunked-transfer-encoding-https/data/test13
new file mode 100644 (file)
index 0000000..1a545c0
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+100\r
+%repeat[255 x %01]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%repeat[255 x A]%
+%repeat[255 x B]%
+%repeat[255 x C]%
+%repeat[255 x %01]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, chunk at the end contains binary ones and is valid
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test14 b/tests/cts/chunked-transfer-encoding-https/data/test14
new file mode 100644 (file)
index 0000000..71d0c09
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+100\r
+%repeat[255 x %hex[%00]hex%]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%repeat[255 x A]%
+%repeat[255 x B]%
+%repeat[255 x C]%
+%repeat[255 x %hex[%00]hex%]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, chunk at the end contains binary zeroes and is valid.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test15 b/tests/cts/chunked-transfer-encoding-https/data/test15
new file mode 100644 (file)
index 0000000..99163a0
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+100\r
+%repeat[255 x %hex[%00]hex%]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%repeat[255 x A]%
+%repeat[255 x B]%
+%repeat[255 x C]%
+%repeat[255 x %hex[%00]hex%]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, chunk at the end contains binary zeroes and is valid.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test16 b/tests/cts/chunked-transfer-encoding-https/data/test16
new file mode 100644 (file)
index 0000000..95731bc
--- /dev/null
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+2\r
+%hex[%00]hex%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%hex[%00]hex%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Single chunk with binary zeroes that is valid.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test17 b/tests/cts/chunked-transfer-encoding-https/data/test17
new file mode 100644 (file)
index 0000000..e78c6f0
--- /dev/null
@@ -0,0 +1,62 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%hex[%FF%00%01]hex%
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%hex[%FF%00%01]hex%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Binary data test. XXX: Not actually a chunked test.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test18 b/tests/cts/chunked-transfer-encoding-https/data/test18
new file mode 100644 (file)
index 0000000..12b4310
--- /dev/null
@@ -0,0 +1,62 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%hex[%00]hex%Blafasel
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%hex[%00]hex%Blafasel
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Binary zero test. XXX: Not actually a chunked-transfer-encoding test.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test19 b/tests/cts/chunked-transfer-encoding-https/data/test19
new file mode 100644 (file)
index 0000000..40ff92b
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x %00]%
+\r
+100\r
+%repeat[255 x %00]%
+\r
+100\r
+%repeat[255 x %00]%
+\r
+100\r
+%repeat[255 x %00]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%repeat[255 x %00]%
+%repeat[255 x %00]%
+%repeat[255 x %00]%
+%repeat[255 x %00]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple valid chunks with binary zeros.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test2 b/tests/cts/chunked-transfer-encoding-https/data/test2
new file mode 100644 (file)
index 0000000..4ec49b8
--- /dev/null
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+6\r
+AAAAA
+\r
+100\r
+%repeat[255 x B]%
+\r
+1000\r
+%repeat[4095 x C]%
+\r
+10000\r
+%repeat[65535 x D]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established
+
+HTTP/1.1 200 OK
+Date: Thu, 22 Jul 2010 11:22:33 GMT
+Connection: close
+Content-Type: text/html
+X-Control: swsclose
+
+AAAAA
+%repeat[255 x B]%
+%repeat[4095 x C]%
+%repeat[65535 x D]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks delivered through https.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test20 b/tests/cts/chunked-transfer-encoding-https/data/test20
new file mode 100644 (file)
index 0000000..5b933b9
--- /dev/null
@@ -0,0 +1,86 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100 blafasel %hex[%00]hex%\r
+%repeat[255 x C]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100 blafasel %hex[%00]hex%\r
+%repeat[255 x C]%
+\r
+0\r
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, invalid binary zero in chunk extension.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+# XXX: Why does curl not detect this?
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test21 b/tests/cts/chunked-transfer-encoding-https/data/test21
new file mode 100644 (file)
index 0000000..91cc78c
--- /dev/null
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+12345\r
+%repeat[74564 x A]%
+\r
+67891\r
+%repeat[424080 x B]%
+\r
+31337\r
+%repeat[201526 x C]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+%repeat[74564 x A]%
+%repeat[424080 x B]%
+%repeat[201526 x C]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple largish chunks.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test22 b/tests/cts/chunked-transfer-encoding-https/data/test22
new file mode 100644 (file)
index 0000000..320fbf8
--- /dev/null
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Only last chunk, no actual data.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test3 b/tests/cts/chunked-transfer-encoding-https/data/test3
new file mode 100644 (file)
index 0000000..c51b1f6
--- /dev/null
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+6 Oh noes\r
+AAAAA
+\r
+100 there is\r
+%repeat[255 x B]%
+\r
+1000 bogus data\r
+%repeat[4095 x C]%
+\r
+10000 here \r
+%repeat[65535 x D]%
+\r
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+X-Control: swsclose\r
+\r
+AAAAA
+%repeat[255 x B]%
+%repeat[4095 x C]%
+%repeat[65535 x D]%
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks with garbage after chunk-sizes deliverd through https.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test4 b/tests/cts/chunked-transfer-encoding-https/data/test4
new file mode 100644 (file)
index 0000000..5505caa
--- /dev/null
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+123\r
+This chunk is too small
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+123\r
+This chunk is too small
+0\r
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Single chunk that is too small delivered through https.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+18
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test5 b/tests/cts/chunked-transfer-encoding-https/data/test5
new file mode 100644 (file)
index 0000000..a881897
--- /dev/null
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+3\r
+AA
+\r
+4\r
+BBB
+\r
+123\r
+This chunk is too small
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+3\r
+AA
+\r
+4\r
+BBB
+\r
+123\r
+This chunk is too small
+0\r
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple small chunks, last one too small.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+18
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test6 b/tests/cts/chunked-transfer-encoding-https/data/test6
new file mode 100644 (file)
index 0000000..c5a29ae
--- /dev/null
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+3\r
+AA
+\r
+4\r
+BBB
+\r
+123\r
+This chunk is too small
+4\r
+DDD
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+3\r
+AA
+\r
+4\r
+BBB
+\r
+123\r
+This chunk is too small
+4\r
+DDD
+0\r
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple small chunks, chunk in the middle too small.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+18
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test7 b/tests/cts/chunked-transfer-encoding-https/data/test7
new file mode 100644 (file)
index 0000000..2a2dfb3
--- /dev/null
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+1000\r
+%repeat[4095 x B]%
+\r
+10000\r
+%repeat[65535 x C]%
+123\r
+This chunk is too small
+0\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+1000\r
+%repeat[4095 x B]%
+\r
+10000\r
+%repeat[65535 x C]%
+123\r
+This chunk is too small
+0\r
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, some of them large, last chunk too small.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+56
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test8 b/tests/cts/chunked-transfer-encoding-https/data/test8
new file mode 100644 (file)
index 0000000..61df2c5
--- /dev/null
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - One data chunk, last chunk missing. Delivered through https.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+56
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/data/test9 b/tests/cts/chunked-transfer-encoding-https/data/test9
new file mode 100644 (file)
index 0000000..88f64fb
--- /dev/null
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 Connection established\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 22 Jul 2010 11:22:33 GMT\r
+Connection: close\r
+Content-Type: text/html\r
+Transfer-Encoding: chunked\r
+X-Control: swsclose\r
+\r
+100\r
+%repeat[255 x A]%
+\r
+100\r
+%repeat[255 x B]%
+\r
+100\r
+%repeat[255 x C]%
+\r
+</data>
+</proxy-reply>
+
+<client>
+<server>
+https
+</server>
+<name>
+Chunked transfer encoding - Multiple chunks, last chunk missing.
+</name>
+<features>
+proxy
+</features>
+<command>
+--insecure --raw https://%HOSTIP:%HTTPSPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPSPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<errorcode>
+18
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding-https/privoxy.conf b/tests/cts/chunked-transfer-encoding-https/privoxy.conf
new file mode 100644 (file)
index 0000000..47abfe6
--- /dev/null
@@ -0,0 +1,27 @@
+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
+
+filterfile ../../../default.filter
+actionsfile ./chunked-transfer-encoding.action
+