Skip to content

RTSP, a more robust RTP parser#12052

Closed
icing wants to merge 5 commits into
curl:masterfrom
icing:rtp-parser
Closed

RTSP, a more robust RTP parser#12052
icing wants to merge 5 commits into
curl:masterfrom
icing:rtp-parser

Conversation

@icing

@icing icing commented Oct 7, 2023

Copy link
Copy Markdown
Contributor
  • fix HTTP header parsing to report incomplete lines it buffers as consumed!
  • re-implement the RTP parser for interleave RTP messages for robustness. It is now keeping its state at the connection
  • RTSP protocol handler "readwrite" implementation now tracks if the response is before/in/after header parsing or "in" a bod by calling "Curl_http_readwrite_headers()" itself. This allows it to know when non-RTP bytes are "junk" or HEADER or BODY.
  • adjust "excess" data handling in transfer.c to allow handler->readwrite() to consume that data without causing an error or a undesired connection close
  • tested with cf-socket, simulate slow/blocked receives in debug #12035 and various small receive sizes where current master fails

@icing icing force-pushed the rtp-parser branch 2 times, most recently from 72f37b1 to 552f54c Compare October 8, 2023 10:02
icing added 5 commits October 10, 2023 09:38
- fix HTTP header parsing to report incomplete
  lines it buffers as consumed!
- re-implement the RTP parser for interleave RTP
  messages for robustness. It is now keeping its
  state at the connection
- RTSP protocol handler "readwrite" implementation
  now tracks if the response is before/in/after
  header parsing or "in" a bod by calling
  "Curl_http_readwrite_headers()" itself. This
  allows it to know when non-RTP bytes are "junk"
  or HEADER or BODY.
- tested with curl#12035 and various small receive
  sizes where current master fails
- increase `data->req.bytecount` when writing BODY data to client directly
- do not detect RSTP/ header starts in `RTSPREQ_RECEIVE` mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants