[Privoxy-commits] [privoxy] 03/08: Add three more tests for the chunked-transfer-encoding scenario
User Git
git at git.privoxy.org
Sun May 31 09:38:26 CEST 2026
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 76fbe68263d871308e6f641fb61ce829d4d104eb
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Wed May 20 08:32:33 2026 +0200
Add three more tests for the chunked-transfer-encoding scenario
---
tests/cts/chunked-transfer-encoding/data/test46 | 65 +++++++++++++++++++++++++
tests/cts/chunked-transfer-encoding/data/test47 | 54 ++++++++++++++++++++
tests/cts/chunked-transfer-encoding/data/test48 | 54 ++++++++++++++++++++
3 files changed, 173 insertions(+)
diff --git a/tests/cts/chunked-transfer-encoding/data/test46 b/tests/cts/chunked-transfer-encoding/data/test46
new file mode 100644
index 00000000..693282a8
--- /dev/null
+++ b/tests/cts/chunked-transfer-encoding/data/test46
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK%CR
+Date: Thu, 22 Jul 2010 11:22:33 GMT%CR
+Connection: close%CR
+Content-Type: text/html%CR
+Transfer-Encoding: chunked%CR
+X-Control: swsclose%CR
+%CR
+0000000000000000000000000000000006%CR
+AAAAA
+%CR
+0%CR
+%CR
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK%CR
+Date: Thu, 22 Jul 2010 11:22:33 GMT%CR
+Connection: close%CR
+Content-Type: text/html%CR
+X-Control: swsclose%CR
+Content-Length: 6%CR
+%CR
+AAAAA
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Chunked transfer encoding - One chunk with leading zeros.
+</name>
+<features>
+proxy
+</features>
+<command>
+--raw http://%HOSTIP:%HTTPPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1%CR
+Host: %HOSTIP:%HTTPPORT%CR
+User-Agent: curl/%VERSION%CR
+Accept: */*%CR
+%CR
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding/data/test47 b/tests/cts/chunked-transfer-encoding/data/test47
new file mode 100644
index 00000000..27431be9
--- /dev/null
+++ b/tests/cts/chunked-transfer-encoding/data/test47
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK%CR
+Date: Thu, 22 Jul 2010 11:22:33 GMT%CR
+Connection: close%CR
+Content-Type: text/html%CR
+Transfer-Encoding: chunked%CR
+X-Control: swsclose%CR
+%CR
+10000000%CR
+Not enough data in chunk but as the chunk-size will be rejected
+by Privoxy it does not matter.
+%repeat[10000 x A]%
+</data>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Chunked transfer encoding - One chunk with "unreasonably" large chunk size.
+</name>
+<features>
+proxy
+</features>
+<command>
+--raw http://%HOSTIP:%HTTPPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1%CR
+Host: %HOSTIP:%HTTPPORT%CR
+User-Agent: curl/%VERSION%CR
+Accept: */*%CR
+%CR
+</protocol>
+<errorcode>
+18
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/cts/chunked-transfer-encoding/data/test48 b/tests/cts/chunked-transfer-encoding/data/test48
new file mode 100644
index 00000000..e272f626
--- /dev/null
+++ b/tests/cts/chunked-transfer-encoding/data/test48
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked transfer encoding
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK%CR
+Date: Thu, 22 Jul 2010 11:22:33 GMT%CR
+Connection: close%CR
+Content-Type: text/html%CR
+Transfer-Encoding: chunked%CR
+X-Control: swsclose%CR
+%CR
+FFFFFFFE%CR
+Not enough data in chunk but as the chunk-size will be rejected
+by Privoxy it does not matter.
+%repeat[1000000 x A]%
+</data>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Chunked transfer encoding - One chunk with "unreasonably" large chunk size close to what can be represented with a 32-bit integer.
+</name>
+<features>
+proxy
+</features>
+<command>
+--raw http://%HOSTIP:%HTTPPORT/chunked-transfer-encoding/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1%CR
+Host: %HOSTIP:%HTTPPORT%CR
+User-Agent: curl/%VERSION%CR
+Accept: */*%CR
+%CR
+</protocol>
+<errorcode>
+18
+</errorcode>
+</verify>
+</testcase>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list