runtests: support crlf="yes" for verify/proxy

This commit is contained in:
Daniel Stenberg 2022-12-27 11:50:23 +01:00
parent ca02a77f05
commit dc0725244a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 7 additions and 2 deletions

View File

@ -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/`.
### `<protocol [nonewline="yes"] crlf="yes">`
### `<protocol [nonewline="yes"][crlf="yes"]>`
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.
### `<proxy [nonewline="yes"]>`
### `<proxy [nonewline="yes"][crlf="yes"]>`
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

View File

@ -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;