cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: [ curl-Bugs-631028 ] Fails saveing using -O if URL has spaces

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 6 Nov 2002 20:53:41 +0100 (MET)

On Wed, 6 Nov 2002, Roth, Kevin P. wrote:

> Just curious whether this logic would make sense:
>
> curl examines the URL as given to it. If it finds any non-standard URL
> characters in the path or filename parts (e.g. " ", but not any of
> "/#?&%+...") then it URL-encodes each filename or path part before sending
> to the remote computer, else it sends it as is. Either way, if "-O" is
> used, the file name as given by the user should be used.
>
> If it could be written in a "safe" enough manner, it should be the default
> behavior, which could be disabled by a special flag if needed.

Well, to me it doesn't make sense to prevent curl from sending malformatted
URLs as long as we can understand them and we can make them appear in the
requets. It thus enables people to test their servers with weird input and to
do requests that are outside the bounds of what the standards define.

As for picking another name when -O is used, I find it not really worth the
effort. If the name looks silly, use -o. If you do this from a script, let
the script pick a smarter name.

Of course, if someone writes code for this and it looks and works fine, then
maybe I would consider it.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
Received on 2002-11-06