curl-library
Re: "The Most Dangerous Code in the World"
Date: Mon, 29 Oct 2012 10:33:48 +0100 (CET)
On Mon, 29 Oct 2012, Peter Sylvester wrote:
> Do I understand correctly: verify_host will have two values, i.e equiv to a
> bool?
(For all new and old readers, this is a discussion around my *proposed*
changes as shown in the patch I posted the other day.)
Yes, that is what I'm suggesting. 0 or 2. With 1 then getting treated as
illegal which internally will cause it to equal 2. (Within libcurl the value
becomes a plain simple boolean though.)
The discussion about named constants is all good and I wholeheartedly agree
with it and I am a big proponent of using names instead of magic numbers.
However, introducing these names *now* will also make users of the new defines
not being able to copy their source code back to building with older libcurl
headers so the documentation needs to be very clear on this part.
Possibly we could use these names:
CURLVERIFYHOST_IGNORE (0)
CURLVERIFYHOST_PROPERLY (2 - default)
All other values are considered illegal and will be ignored.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2012-10-29