curl-users
Re: Spaces in redirects
Date: Fri, 6 Jun 2003 15:46:02 +0200 (CEST)
On Fri, 6 Jun 2003, Ralph Mitchell wrote:
> > What does the browsers do on these kinds of headers?
>
> I didn't realize there was a difference between the '+' and '%20'... As
> for case B, I suppose the loop at transfer.c:721 could look for a '?' and
> only substitute spaces after seeing one, and break out of the copy if a
> space is encountered before a '?'.
Yes, that sounds like a working approach.
> When I go to the URL in Netscape 4.79, I get back "The parameter is
> incorrect", and the location bar contains the url with spaces. If I
> replace the spaces, I get to the next redirect, which also contains spaces,
> etc. Internet Explorer, on the other hand, works just fine, but then it is
> an IIS server at the other end, and I've long suspected that Microsoft
> 'tweaks' the protocol... Well, never mind, that's a whole other can of
> worms... :)
I guess that's what happens when the developers used only IE to try their web
site, and it worked just fine...
> As for my script, either I go with my patch (or something similar), or I
> have to turn off redirect-following and convert spaces to plusses myself.
> I'll also try to convince the developers that their web pages suck, but
> that might take awhile.
I remember that someone else brought up this subject before as well, so I
think it is worth addressing.
> I don't want to introduce something that could bite us further down the
> line, so I won't fight too hard for the patch :)
I think we should make sure to not convert any trailing spaces.
-- Daniel Stenberg -- curl: been grokking URLs since 1998 ------------------------------------------------------- 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