From: Daniel Stenberg Date: Tue, 27 Dec 2022 10:50:23 +0000 (+0100) Subject: runtests: support crlf="yes" for verify/proxy X-Git-Tag: curl-7_88_0~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc0725244a3163f1e2d5f51165db3a1a430f3ba0;p=thirdparty%2Fcurl.git runtests: support crlf="yes" for verify/proxy --- diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md index 8143967db3..be111678e2 100644 --- a/tests/FILEFORMAT.md +++ b/tests/FILEFORMAT.md @@ -566,7 +566,7 @@ changing protocol data such as port numbers or user-agent strings. One perl op per line that operates on the protocol dump. This is pretty advanced. Example: `s/^EPRT .*/EPRT stripped/`. -### `` +### `` the protocol dump curl should transmit, if `nonewline` is set, we will cut off the trailing newline of this given data before comparing with the one actually @@ -576,7 +576,7 @@ comparisons are made. `crlf=yes` forces the newlines to become CRLF even if not written so in the test. -### `` +### `` The protocol dump curl should transmit to an HTTP proxy (when the http-proxy server is used), if `nonewline` is set, we will cut off the trailing newline diff --git a/tests/runtests.pl b/tests/runtests.pl index 274911f471..33caf7c5cd 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4750,6 +4750,11 @@ sub singletest { } } + if($hash{'crlf'} || + ($has_hyper && ($keywords{"HTTP"} || $keywords{"HTTPS"}))) { + map subNewlines(0, \$_), @protstrip; + } + $res = compare($testnum, $testname, "proxy", \@out, \@protstrip); if($res) { return $errorreturncode;