cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: URL parsing

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Sun, 14 Apr 2013 10:21:33 +0100

On Sat, 13 Apr 2013, Daniel Stenberg wrote:

> > 1) This only adds support to the URL and not to the username /
> > password that may be specified with the --user or -u command line
> > arguments. It wouldn't take much more work to add support for this
> > as well but I wanted to gather others' opinions on this before
> > attempting this.

> At times authors of applications want to provide user + password
> separate from the URL for various reasons. I figure the same will go for
> "options" associated with it as well...

Sure - I will work on adding this as well.

> > 2) Whilst I have 20 odd years' experience as a C/C++ developer would
> > someone be so kind to check the four uses of sscanf() in url.c between
> > lines 4381 and 4402 to see if this is the best / most optimal way of
> > extracting the user, password and options?

> I've only given it a quick look so far but it seems fine to me.

Thank you - As I tend to spend most of my time with C++/STL these days I
don't use sscanf() as much as I used to ;-)

> Of course we should also come up with some test cases to verify a
> bunch of variations.

Indeed - I've manually tested several variations but will see if I can work
some test cases to this as well.

Cheers again

Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-04-14