cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Parsing in src/tool_parsecfg.c

From: Gisle Vanem <gvanem_at_yahoo.no>
Date: Mon, 9 Dec 2013 17:03:31 +0100

"Daniel Stenberg" <daniel_at_haxx.se> wrote:

> Here's a stab at presenting a warning to aid users detect syntax problems in
> the config files. It sees unquoted white spaces in the parameter and warns
> about them.

I applied this patch. And this improves the warning.

But I'm not sure all is kosher in handling of '\' in Windows
paths with spaces. Those path/file-names should be quoted,
right?

E.g. _curlrc:
  random-file e:\net\lynx28\rand.fil

turns into (according to 'curl --libcurl -'):
  curl_easy_setopt(hnd, CURLOPT_RANDOM_FILE, "e:\\net\\lynx28\\rand.fil");

which may be okay depending on where this is handled (OpenSSL or core
Win32 function).

So if I do,
  random-file "c:\Program Files\Random Source.fil"

this turns into:
  curl_easy_setopt(hnd, CURLOPT_RANDOM_FILE, "c:Program FilesRandom Source.fil");

according to the same 'curl --libcurl -'. This is never okay at any level.
I'm not sure where/how (or even if) this could be improved.

--gv
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-09