GNOME Bugzilla – Bug 611481
gets stuck loading site with broken Content-Length
Last modified: 2010-08-02 21:13:34 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?
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".
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
Attachment 166870 [details] pushed as 74e2530 - soup-message-io: fix wrong-Content-Length logic