mirror of
https://github.com/curl/curl.git
synced 2026-04-12 00:11:42 +08:00
- `reply/data*`, `verify/stdout`, `verify/stderr`, `verify/file*`,
`verify/proxy`:
- make `crlf="yes"` force CRLF to all lines, instead of just applying
to HTTP protocol headers.
- add support for `crlf="headers"` that only converts HTTP protocol
header lines to CRLF. (previously done via `crlf="yes"`.)
- use `crlf="headers"` where possible.
- `reply/connect*`:
- add support for `crlf="yes"` and `crlf="headers"`.
- use them where possible.
- `client/file*`, `client/stdin`:
- add support for `crlf="yes"`.
- use it where possible.
- `reply/data*`, `verify/protocol`:
- replace existing uses of `crlf="yes"` with `crlf="headers`" where it
does not change the result.
Reducing the number of `tests/data/test*`:
- CRLF newlines from 10295 to 1985. (119985 lines total)
- files with mixed newlines from 656 to 113. (1890 files total)
After this patch there remain 141 sections with mixed newlines, where
the mixing is not split between headers/non-headers. There is no obvious
pattern here. Some of the CRLF uses might be accidental, or
non-significant. They will be tackled in a future patch.
Follow-up to 6cf3d7b1b1 #19318
Follow-up to 4d2a05d3fe #19284
Closes #19313
77 lines
1.3 KiB
Plaintext
77 lines
1.3 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
curl_easy_header
|
|
CONNECT
|
|
</keywords>
|
|
</info>
|
|
|
|
# Server-side
|
|
<reply>
|
|
<data nocheck="yes">
|
|
HTTP/1.1 200 OK
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
Server: test with trailing space%repeat[5 x ]%
|
|
Content-Type: text/html
|
|
Content-Length: 0
|
|
Set-Cookie: onecookie=data;
|
|
Set-Cookie: secondcookie=2data;
|
|
Set-Cookie: cookie3=data3;
|
|
Location: /%TESTNUMBER0002
|
|
|
|
</data>
|
|
<connect crlf="headers">
|
|
HTTP/1.1 200 Sure go ahead
|
|
Server: from the connect
|
|
Silly-thing: yes yes
|
|
|
|
</connect>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<features>
|
|
proxy
|
|
SSL
|
|
headers-api
|
|
</features>
|
|
<server>
|
|
http
|
|
http-proxy
|
|
</server>
|
|
|
|
<name>
|
|
curl_easy_nextheader with server + CONNECT
|
|
</name>
|
|
<tool>
|
|
lib%TESTNUMBER
|
|
</tool>
|
|
|
|
<command>
|
|
http://hello:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT
|
|
</command>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<proxy crlf="headers">
|
|
CONNECT hello:%HTTPPORT HTTP/1.1
|
|
Host: hello:%HTTPPORT
|
|
Proxy-Connection: Keep-Alive
|
|
|
|
</proxy>
|
|
<stdout>
|
|
Server == from the connect (0/2)
|
|
Silly-thing == yes yes (0/1)
|
|
Date == Thu, 09 Nov 2010 14:49:00 GMT (0/1)
|
|
Server == test with trailing space (1/2)
|
|
Content-Type == text/html (0/1)
|
|
Content-Length == 0 (0/1)
|
|
Set-Cookie == onecookie=data; (0/3)
|
|
Set-Cookie == secondcookie=2data; (1/3)
|
|
Set-Cookie == cookie3=data3; (2/3)
|
|
Location == /19450002 (0/1)
|
|
</stdout>
|
|
</verify>
|
|
</testcase>
|