1From dc0725244a3163f1e2d5f51165db3a1a430f3ba0 Mon Sep 17 00:00:00 2001 2From: Daniel Stenberg <daniel@haxx.se> 3Date: Tue, 27 Dec 2022 11:50:23 +0100 4Subject: [PATCH] runtests: support crlf="yes" for verify/proxy 5 6Conflict: Context adaptation 7Reference: https://github.com/curl/curl/commit/dc0725244a3163f1e2d5f51165db3a1a430f3ba0 8--- 9 tests/FILEFORMAT.md | 4 ++-- 10 tests/runtests.pl | 5 +++++ 11 2 files changed, 7 insertions(+), 2 deletions(-) 12 13diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md 14index 7a9c482..e17605b 100644 15--- a/tests/FILEFORMAT.md 16+++ b/tests/FILEFORMAT.md 17@@ -527,14 +527,14 @@ changing protocol data such as port numbers or user-agent strings. 18 One perl op per line that operates on the protocol dump. This is pretty 19 advanced. Example: `s/^EPRT .*/EPRT stripped/`. 20 21-### `<protocol [nonewline="yes"]>` 22+### `<protocol [nonewline="yes"][crlf="yes"]>` 23 24 the protocol dump curl should transmit, if 'nonewline' is set, we will cut off 25 the trailing newline of this given data before comparing with the one actually 26 sent by the client The `<strip>` and `<strippart>` rules are applied before 27 comparisons are made. 28 29-### `<proxy [nonewline="yes"]>` 30+### `<proxy [nonewline="yes"][crlf="yes"]>` 31 32 The protocol dump curl should transmit to a HTTP proxy (when the http-proxy 33 server is used), if 'nonewline' is set, we will cut off the trailing newline 34diff --git a/tests/runtests.pl b/tests/runtests.pl 35index 38b76e8..098b19e 100755 36--- a/tests/runtests.pl 37+++ b/tests/runtests.pl 38@@ -4486,6 +4486,11 @@ sub singletest { 39 } 40 } 41 42+ if($hash{'crlf'} || 43+ ($has_hyper && ($keywords{"HTTP"} || $keywords{"HTTPS"}))) { 44+ map subNewlines(0, \$_), @protstrip; 45+ } 46+ 47 $res = compare($testnum, $testname, "proxy", \@out, \@protstrip); 48 if($res) { 49 return $errorreturncode; 50-- 512.33.0 52 53