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 611481 - gets stuck loading site with broken Content-Length
gets stuck loading site with broken Content-Length
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: HTTP Transport
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2010-03-01 14:10 UTC by Dan Winship
Modified: 2010-08-02 21:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
soup-message-io: fix wrong-Content-Length logic (3.61 KB, patch)
2010-07-31 08:38 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2010-03-01 14:10:05 UTC
from https://bugs.webkit.org/show_bug.cgi?id=35517:

  When trying to load http://twistedmatrix.com/trac/ with gtklauncher, it
  stays stuck at 47%. Also confirmed with epiphany and midori.

Also confirmed with tests/get.c. For the page's CSS files (eg, http://twistedmatrix.com/trac/chrome/common/css/trac.css), it appears to be sending a Content-Length that is too large, and not closing the connection when it gets to the end (even though it's also sending "Connection: close"). So the real question is: how the hell does this work under other browsers?
Comment 1 Dan Winship 2010-03-13 17:13:08 UTC
i misread the headers before; the content-length is correct, it's just that because the connection is marked "Connection: close", we ignore the content-length because of http://git.gnome.org/browse/libsoup/commit/?id=2835654f19000ee9b8b689a617936e299b6d6213. Our logic here apparently does not actually match mozilla. I'll have to do some tests, but I think it's supposed to be "if the server closes the connection early on a non-persistent content-length-encoded response, then don't consider it an error, but don't read beyond the specified content-length if the response does go that far".
Comment 2 Dan Winship 2010-07-31 08:38:06 UTC
Created attachment 166870 [details] [review]
soup-message-io: fix wrong-Content-Length logic

the twistedmatrix.com URL above seems to have been fixed? so I'm not totally
sure this patch fixes the problem. we need a test case
Comment 3 Dan Winship 2010-08-02 21:13:30 UTC
Attachment 166870 [details] pushed as 74e2530 - soup-message-io: fix wrong-Content-Length logic