curl-curl/tests/data/test571
Viktor Szakats 63e9721b63
tests: avoid hard-coded CRLFs in more sections
- `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
2025-11-03 21:15:12 +01:00

123 lines
2.4 KiB
Plaintext

<testcase>
# Informational
# Bang on RTP by
# 1) giving an evil payload (with $)
# 2) Giving evil content (SDP starting with $)
# 3) packing rtp after headers, after content, and at the start
<info>
<keywords>
RTSP
RTP
</keywords>
</info>
# Server-side
<reply>
<data1 crlf="headers">
RTSP/1.0 200 OK
Server: RTSPD/libcurl-test
Session: asdf
CSeq: 1
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
</data1>
<data2 crlf="headers">
RTSP/1.0 200 OK
Server: RTSPD/libcurl-test
CSeq: 2
Session: asdf
</data2>
<data3 crlf="headers">
RTSP/1.0 200 OK
Server: RTSPD/libcurl-test
Cseq: 3
Content-Length: 4
Content-Type: fake/evil
$99
</data3>
<data4 crlf="headers">
RTSP/1.0 200 OK
Server: RTSPD/libcurl-test
Session: asdf
CSeq: 4
</data4>
<servercmd>
rtp: part 2 channel 1 size 10
rtp: part 2 channel 0 size 500
rtp: part 2 channel 0 size 196
rtp: part 2 channel 0 size 124
rtp: part 2 channel 0 size 824
rtp: part 2 channel 0 size 18 size_err -6
rtp: part 3 channel 1 size 10
rtp: part 3 channel 0 size 50
rtp: part 4 channel 0 size 798
rtp: part 4 channel 0 size 42
rtp: part 4 channel 1 size 30
rtp: part 4 channel 0 size 2048
rtp: part 4 channel 0 size 85
rtp: part 4 channel 1 size 24
rtp: part 4 channel 0 size 17 size_err -4
rtp: part 4 channel 0 size 33
rtp: part 4 channel 0 size 127
rtp: part 4 channel 1 size 24 size_err 11
rtp: part 4 channel 0 size 37
rtp: part 4 channel 0 size 63
</servercmd>
</reply>
# Client-Side
<client>
<server>
rtsp
</server>
<tool>
lib%TESTNUMBER
</tool>
<name>
RTSP RTP Interleaving Test
</name>
<command>
rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER %LOGDIR/protofile%TESTNUMBER.txt
</command>
</client>
<verify>
<stdout>
RTP: message size 10, channel 1
RTP: message size 500, channel 0
RTP: message size 196, channel 0
RTP: message size 124, channel 0
RTP: message size 824, channel 0
RTP: message size 12, channel 0
RTP: message size 10, channel 1
RTP: message size 50, channel 0
RTP: message size 798, channel 0
RTP: message size 42, channel 0
RTP: message size 30, channel 1
RTP: message size 2048, channel 0
RTP: message size 85, channel 0
RTP: message size 24, channel 1
RTP: message size 13, channel 0
RTP: message size 33, channel 0
RTP: message size 127, channel 0
RTP: message size 35, channel 1
RTP PAYLOAD END CORRUPTED (11), [$]
RTP: message size 63, channel 0
</stdout>
<file name="%LOGDIR/protofile%TESTNUMBER.txt">
$99
</file>
</verify>
</testcase>