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 353337 - assert from the http module
assert from the http module
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: http
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Christian Kellner
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-29 03:09 UTC by Matthias Clasen
Modified: 2006-09-01 19:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Just return on errors during redirection (1.52 KB, patch)
2006-08-30 18:17 UTC, Christian Kellner
committed Details | Review

Description Matthias Clasen 2006-08-29 03:09:00 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.
Comment 1 Matthias Clasen 2006-08-29 12:05:00 UTC
The downstream  bug https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203678
has a patch attached.
Comment 2 Christian Kellner 2006-08-30 18:17:07 UTC
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().
Comment 3 Christian Kellner 2006-08-30 18:17:34 UTC
-> Assign to me
Comment 4 Matthias Clasen 2006-08-30 18:54:48 UTC
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
Comment 5 Christian Kellner 2006-08-30 20:27:49 UTC
clicking on that link in firefox opens the picutre, btw, so maybe 7 as the max number of redirects is not enough. Opinions?
Comment 6 Alexander Larsson 2006-09-01 10:59:05 UTC
What is the problem with the site? Does it really redirect you more than 7 times before reaching the target?
Comment 7 Christian Kellner 2006-09-01 17:11:55 UTC
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!
Comment 8 Christian Kellner 2006-09-01 19:29:26 UTC
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.