GNOME Bugzilla – Bug 724717
souphttpsrc: Error at the end of connection with unknown content size
Last modified: 2014-02-19 16:04:16 UTC
Bug 683536 introduced regression for us. Commit 46fd12ae5ec53200b16dfd7f17048d6bc60fbfbc introduced connection recovery. That if very desired functionality. But the commit introduced regression when souphttpsrc us used with http server that does not specify the content-size. Souphttpsrc tries to reconnect after every regular end of connection. If the server does not support seeking, souphttpsrc throws error. Even when server responds RANGE_NOT_SATISFIABLE, souphttpsrc throws error. It throws error at the end of every connection. Ideally we could check whether the TCP connection was finished with FIN or with RST and do not retry on FIN. But I did not find a way how to dig this information from soup. Does it make sense to retry when content-size is not known?
Created attachment 269683 [details] [review] emit EOS when server replies RANGE_NOT_SATISFIABLE and we have body Attaching patch that improves the situation when server replies with RANGE_NOT_SATISFIABLE. The problem is still present when server does not support seeking at all.
Created attachment 269690 [details] [review] Do not retry to reconnect when size is unknown This commit disables retries when content size is unknown. I believe that the the field has_body is not needed any more, but I don't want to push cleanup code until I have more feedback.
Comment on attachment 269690 [details] [review] Do not retry to reconnect when size is unknown This commit was already there: commit 9cac68709a5bc3d01564fa58ee1afc8bc886205c Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Feb 12 12:39:10 2014 +0100 souphttpsrc: Retry connection if we're finished before the content size only if we actually have a content size https://bugzilla.gnome.org/show_bug.cgi?id=722185
Using git fetch would save me couple of hours and you this bug report. Thank you Sabastian. *** This bug has been marked as a duplicate of bug 722185 ***