What about adding a function to validate a url, with a note that curl will 
attempt to resolve invalid url's as best it can.  Then if the embedder wants to 
use strict mode, it can call the function first and not even call into libcurl 
if the url is invalid.  Then we can unit test most of curl in lax mode, and 
just unit test the one function for strict url parsing.
________________________________________
From: [email protected] [[email protected]] on 
behalf of Daniel Stenberg [[email protected]]
Sent: Monday, April 23, 2012 3:01 PM
To: libcurl development
Subject: Re: liberal or strict?

On Mon, 23 Apr 2012, Alessandro Ghedini wrote:

> What about option (2) with an additional "--allow-invalid-url" (and
> equivalent libcurl) option? (if that's possible at all, of course)

I guess that could work, but I think that's the worst alternative since then
we have to support, test and document both versions and yet people will almost
always use the default.

Also, if we would then not "allow invalid urls", wouldn't that imply that we
should increase scrictness in other places where we are still pretty laxed
today? Seems like a slipperly sloap to avoid...

--

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to