souphttpsrc: retry request on early termination from the server
authorArnaud Vrac <avrac@freebox.fr>
Thu, 19 Jan 2017 10:08:11 +0000 (11:08 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 26 Jan 2017 13:59:46 +0000 (15:59 +0200)
commit03db374144e7f62cefa5190548519692990ea8bc
tree2f6fd4cbaa0b2251029be79b0997aa01d2a26581
parenta8eb0515f1e3b096f978189cfd3cd01d576f390f
souphttpsrc: retry request on early termination from the server

Fix a regression introduced by commit 183695c61a54f1 (refactor to use
Soup's sync API). The code previously attempted to reconnect when the
server closed the connection early, for example when the stream was put
in pause for some time.

Reintroduce this feature by checking if EOS is received before the
expected content size is downloaded. In this case, do the request
starting at the previous read position.

https://bugzilla.gnome.org/show_bug.cgi?id=776720
ext/soup/gstsouphttpsrc.c