tests/cts: When there's lots of POST data, read it from a file
authorFabian Keil <fk@fabiankeil.de>
Tue, 24 May 2022 06:07:40 +0000 (08:07 +0200)
committerFabian Keil <fk@fabiankeil.de>
Wed, 20 Mar 2024 11:38:39 +0000 (12:38 +0100)
... instead of the command line.

Makes it less likely that the curl executions fails due
to the argument list being too long.

Reported by: Roland

Sponsored by: Privoxy project funds collected at SPI

tests/cts/client-body-filter/data/test12
tests/cts/client-body-tagger-https/data/test15
tests/cts/client-body-tagger-https/data/test7
tests/cts/client-body-tagger/data/test7

index 8db65fd..b2d3ad6 100644 (file)
@@ -39,8 +39,11 @@ proxy
 # Sending the first request to appease the test framework.
 # We mainly care about the second request which is too large for Privoxy to buffer it.
 <command>
-http://%HOSTIP:%HTTPPORT/first-request/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" http://%HOSTIP:%HTTPPORT/second-request/%TESTNUMBER
+http://%HOSTIP:%HTTPPORT/first-request/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER http://%HOSTIP:%HTTPPORT/second-request/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>
index f16f5a3..ece0648 100644 (file)
@@ -40,8 +40,11 @@ Two requests to the same URL. The second one is a POST request with an offending
 proxy
 </features>
 <command>
--s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
+-s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>
index dd72ae8..445148d 100644 (file)
@@ -42,8 +42,11 @@ Two requests to the same URL. The second one is a POST request with an offending
 proxy
 </features>
 <command>
--s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
+-s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>
index d108d81..753d89f 100644 (file)
@@ -29,8 +29,11 @@ Two requests to the same URL. The second one is a POST request with an offending
 proxy
 </features>
 <command>
--s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" -s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER -s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>