cURL / Mailing Lists / curl-library / Single Mail

curl-library

error fetching page on redirect to relative url

From: Wing Yung <wingerz_at_gmail.com>
Date: Thu, 12 Jul 2007 20:47:16 -0400

Hi,

I have run into trouble getting libcurl to follow a redirect. When the
page is reached and the 301 is received, libcurl hangs. The page in
question is:

http://www.etoys.com/HelpSectionTitlesAndUrls.html

This is the location that is returned:

Location: /HelpSectionTitlesAndUrls.html?_e=4696c&_v=4696C98B0HgKa85CF6D20202

Has anyone else run into it? My suspicion is that the code in
lib/transfer.c is responsible, maybe where it says the following:
    /***
     *DANG* this is an RFC 2068 violation. The URL is supposed
     to be absolute and this doesn't seem to be that!
     ***
     Instead, we have to TRY to append this new path to the old URL
     to the right of the host part. Oh crap, this is doomed to cause
     problems in the future...
    */

Probably getting caught up in one of the while loops that is
performing the new URL construction.

We are currently using v7.15.5 of the library but will probably be
upgrading to the latest. I will take a closer look at it tomorrow, but
would appreciate any guidance or a fix.

Thank you,
Wing
Received on 2007-07-13