mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-07 04:11:26 +00:00
souphttpsrc: don't update the size on error
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>
This commit is contained in:
parent
88775c2e18
commit
d4b50d7915
1 changed files with 3 additions and 2 deletions
|
@ -1173,8 +1173,9 @@ gst_soup_http_src_got_headers (GstSoupHTTPSrc * src, SoupMessage * msg)
|
||||||
gst_event_unref (http_headers_event);
|
gst_event_unref (http_headers_event);
|
||||||
|
|
||||||
/* Parse Content-Length. */
|
/* Parse Content-Length. */
|
||||||
if (soup_message_headers_get_encoding (msg->response_headers) ==
|
if (SOUP_STATUS_IS_SUCCESSFUL (msg->status_code) &&
|
||||||
SOUP_ENCODING_CONTENT_LENGTH) {
|
(soup_message_headers_get_encoding (msg->response_headers) ==
|
||||||
|
SOUP_ENCODING_CONTENT_LENGTH)) {
|
||||||
newsize = src->request_position +
|
newsize = src->request_position +
|
||||||
soup_message_headers_get_content_length (msg->response_headers);
|
soup_message_headers_get_content_length (msg->response_headers);
|
||||||
if (!src->have_size || (src->content_size != newsize)) {
|
if (!src->have_size || (src->content_size != newsize)) {
|
||||||
|
|
Loading…
Reference in a new issue