curl-users
Spaces in redirects
Date: Fri, 06 Jun 2003 03:43:34 -0500
I've just run into a problem with a Weblogic server I'm trying to pull
pages from. During the login POST, I get back several redirects, one of
which contains this partial string:
&resp=Authentication Successfull&pwd_exp_date=7/20/2003 3:57:04 PM
Curl happily follows the first redirect, then tries the second, which
gets cut off at the space before "Successful".
I realize this is probably a mal-formed redirect, probably innocently
caused by the company code-monkeys, and I'm trying to get them to see
the light and fix it. However...
Would it be unreasonable to replace space with + when following the
redirect? I've looked at that section of transfer.c (line 721) and
found that the redirect url is being copied to the end, or to the first
space, whichever comes first. I didn't think anything would follow the
url on a Location: line, so that kinda seems a little odd.
So, am I wrong, and could there be something after the redirect url? If
so, then it's reasonable to cut off after the space. If not, could this
be altered to replace spaces with pluses, or is that a big policy no-no?
Ralph Mitchell
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
Received on 2003-06-06