Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTSP, a more robust RTP parser #12052

Closed
wants to merge 5 commits into from
Closed

RTSP, a more robust RTP parser #12052

wants to merge 5 commits into from

Conversation

icing
Copy link
Contributor

@icing icing commented Oct 7, 2023

  • 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

- 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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants