GNOME Bugzilla – Bug 353337
assert from the http module
Last modified: 2006-09-01 19:29:26 UTC
gnomevfs-info http://www.peoplein.net/bbs/data/potrait2/Untitled_22.jpg runs into case NE_REDIRECT: case NE_RETRY: g_assert_not_reached (); in resolve_result. Since NE_REDIRECT _is_ handled in the caller (http_get_file_info), it seems that http_get_file_info needs to handle retry, too ? Also, I wonder if http_get_file_info should worry about limiting the number of redirects it follows or retrys it attempts. And if http_follow_redirect doesn't return OK, we'll still run into the assert in resolve_result, I think.
The downstream bug https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203678 has a patch attached.
Created attachment 71918 [details] [review] Just return on errors during redirection So turns out the work machine here (FC5) has a too old intltool which means I cannot even compile the test, let alone test it. I looked carefully at it so I *hope* it compiles cleanly and handles all cases where we did a resolve_result after an http_follow_redirect().
-> Assign to me
Applies cleanly, and seems to fix the issue: [mclasen@golem devel]$ gnomevfs-info http://www.peoplein.net/bbs/data/potrait2/Untitled_22.jpg Error: Too many links Thanks
clicking on that link in firefox opens the picutre, btw, so maybe 7 as the max number of redirects is not enough. Opinions?
What is the problem with the site? Does it really redirect you more than 7 times before reaching the target?
This site is another sad story of broken http server (or scrips, since this is apache). If you do a GET on the resource, everything is fine. If you do a HEAD you will get a 302 FOUND with a Location header to http://www.pooding.com. Doing another HEAD to / on that host then will give you a 302 FOUND with a Location header to http://www.pooding.com. Yepp, we are stuck in a loop. After 7 times the loop detection of the http method kicks in, therefore the E_TOO_MANY_LINKS. *sigh* Maybe always doing a GET and *never* a HEAD is the solution (there is another bug open about some other broken server). I hate this!
Btw, the patch is commited to CVS HEAD and will be in for 2.16. Thanks Matthias for catching that. I am closing that bug because we already have another open for the HEAD vs GET issue.