cURL / Mailing Lists / curl-users / Single Mail

curl-users

Problem with ./ in redirect

From: <rmitchell_at_eds.com>
Date: Thu, 03 Oct 2002 04:32:17 -0500

OK, first off, this may not be a curl issue, and I'm happy if someone can give
me chapter and verse telling me why not.

What I'm seeing is this: I go to fetch a page from server X, get a bunch of
redirects that end up at server Y, which presents a login page. I post back
the relevant fields to server Y, which then sends more redirects, the last of
which looks like this:

    Location: ./welcome.jsp

along with a cookie or two. curl inserts the path to the file and tries to
fetch:

    http://serverY/dirA/dirB/./welcome.jsp

which gets me "500: Server Error [00-0002]".

Now, when I use Netscape or Konqueror to login to the same site, the final
page shows up correctly, and the path does *NOT* include the ./ in it. In
other words, the browsers have correctly replaced the leading dot with the
path to the file and fetched:

    http://serverY/dirA/dirB/welcome.jsp

So, is curl forgetting to strip out the leading dot when it fills in the file
path? If curl is behaving correctly, it's going to be a PITA to work
around... :)

I might be able to beat up the owners of serverY and get them to take out the
./, because that's essentially a no-op, but I suspect it may be 3rd party code
and therefore a lot harder to get corrected.

Ralph Mitchell

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-03