mirror of
https://github.com/curl/curl.git
synced 2026-04-16 17:51:40 +03:00
rtsp: stop reading empty DESCRIBE responses
Based-on-patch-by: Jim Hollinger
This commit is contained in:
parent
e4fb5f2f61
commit
14ff86256b
1 changed files with 10 additions and 0 deletions
10
lib/http.c
10
lib/http.c
|
|
@ -3185,6 +3185,16 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
|
|||
*/
|
||||
if(data->set.opt_no_body)
|
||||
*stop_reading = TRUE;
|
||||
#ifndef CURL_DISABLE_RTSP
|
||||
else if((conn->handler->protocol & CURLPROTO_RTSP) &&
|
||||
(data->set.rtspreq == RTSPREQ_DESCRIBE) &&
|
||||
(k->size <= -1))
|
||||
/* Respect section 4.4 of rfc2326: If the Content-Length header is
|
||||
absent, a length 0 must be assumed. It will prevent libcurl from
|
||||
hanging on DECRIBE request that got refused for whatever
|
||||
reason */
|
||||
*stop_reading = TRUE;
|
||||
#endif
|
||||
else {
|
||||
/* If we know the expected size of this document, we set the
|
||||
maximum download size to the size of the expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue