mirror of
https://github.com/curl/curl.git
synced 2026-07-28 12:53:06 +03:00
RTSP: improved RTP parser
- 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 #12035 and various small receive sizes where current master fails Closes #12052
This commit is contained in:
parent
117c9bd978
commit
7eb31c852d
4 changed files with 280 additions and 160 deletions
|
|
@ -3986,6 +3986,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
|
|||
char *end_ptr;
|
||||
|
||||
/* header line within buffer loop */
|
||||
*stop_reading = FALSE;
|
||||
do {
|
||||
size_t rest_length;
|
||||
size_t full_length;
|
||||
|
|
@ -4023,7 +4024,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*nread = 0;
|
||||
break; /* read more and try again */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue