After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724717 - souphttpsrc: Error at the end of connection with unknown content size
souphttpsrc: Error at the end of connection with unknown content size
Status: RESOLVED DUPLICATE of bug 722185
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.2.1
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-19 14:17 UTC by Branislav Katreniak
Modified: 2014-02-19 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
emit EOS when server replies RANGE_NOT_SATISFIABLE and we have body (1.47 KB, patch)
2014-02-19 14:23 UTC, Branislav Katreniak
committed Details | Review
Do not retry to reconnect when size is unknown (1.51 KB, patch)
2014-02-19 14:29 UTC, Branislav Katreniak
committed Details | Review

Description Branislav Katreniak 2014-02-19 14:17:26 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?
Comment 1 Branislav Katreniak 2014-02-19 14:23:13 UTC
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.
Comment 2 Branislav Katreniak 2014-02-19 14:29:26 UTC
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 3 Sebastian Dröge (slomo) 2014-02-19 15:53:18 UTC
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
Comment 4 Branislav Katreniak 2014-02-19 16:03:43 UTC
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 ***