Any data corresponding length in the message is not part of the requested
file.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/385>
gst_event_unref (http_headers_event);
/* Parse Content-Length. */
- if (soup_message_headers_get_encoding (msg->response_headers) ==
- SOUP_ENCODING_CONTENT_LENGTH) {
+ if (SOUP_STATUS_IS_SUCCESSFUL (msg->status_code) &&
+ (soup_message_headers_get_encoding (msg->response_headers) ==
+ SOUP_ENCODING_CONTENT_LENGTH)) {
newsize = src->request_position +
soup_message_headers_get_content_length (msg->response_headers);
if (!src->have_size || (src->content_size != newsize)) {