cURL / Mailing Lists / curl-users / Single Mail

curl-users

I'd like to do a minor -K parser modification

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 7 Nov 2013 00:05:46 +0100 (CET)

Hey

I'd like to make the -K config file parser slightly less liberal and I want to
hear if anyone think this would hurt them.

Currently when using -K to specify a file to read options from, you can make
that file specifiy options like this:

  # all these do the same
  --post "data"
  post = "data"
  -d = "data"
  -d:data

We got a bug report[1] on this since if you'd want to specify just colon to
-u (like "-u :" which you can on the command line), you can't since the colon
is a separator in the file.

  --user = ":"
  -u = :
  -u : :
  user : ":"

So, my thinking is that we clean this up somewhat (see attached patch). I'd
like to no longer allow colon or equals on lines where options are specified
with a dash. So, if -u, -d or --user are specified they have to be written
more like they are on a command line, and only if you write the long option
without dashes you get the colon or equals to play with!

  user : "daniel"
  --user "daniel"
  -u daniel
  user = daniel

which then would make the following currently valid lines illegal:

  -u : daniel
  --user = "daniel"

This would fix the bug but risk making a few existing(?) use cases
incompatible.

Thoughts?

[1] = https://sourceforge.net/p/curl/bugs/1297/

-- 
  / daniel.haxx.se


-------------------------------------------------------------------
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-11-07