diff options
author | Erik Janssen <erik.janssen@axis.com> | 2015-08-20 23:07:03 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-08-20 23:07:03 +0200 |
commit | 14ff86256b13e9c74ee53f52bba1de0e6043b099 (patch) | |
tree | 955e737db39e2a23c23a24319457d73d90ae5b78 /lib | |
parent | e4fb5f2f61487caa7229ab358754658ef072f537 (diff) |
rtsp: stop reading empty DESCRIBE responses
Based-on-patch-by: Jim Hollinger
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index 9817d72af..d7b56c30b 100644 --- a/lib/http.c +++ b/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 |