Re: [PATCH/RFC] http_init: only initialize SSL for https
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 14, 2013, 16:46 UTC
- Message-ID
- <7vmwu6x72q.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CABPQNSZNdGea9Nn91emWhfRGAZjZXm755UKArNr3EUy9CrSKHg@mail.gmail.com>
Erik Faye-Lund <kusmabite@gmail.com> writes:
Show 12 quoted lines
>> I wonder whether we want to have something like this instead: >> >> flags = CURL_GLOBAL_ALL; >> if (prefixcmp(url, "https:")) >> flags &= ^CURL_GLOBAL_SSL; >> curl_global_init(flags); >> >> I do see that CURL_GLOBAL_ALL is #define'd as CURL_GLOBAL_WIN32 | >> CURL_GLOBAL_SSL in curl.h, but that might change in the future, no? > > Good suggestion. But perhaps we'd want to use CURL_GLOBAL_DEFAULT > instead?
That as a follow-up suggestion may be fine but if you go that route, you would need to explicitly flip SSL on when you know it is going to an SSL destination.
The way to determine SSL-ness has to be rock solid and that is much more important than ALL vs DEFAULT. Is prefixcmp(url, "https://") the right way to do so? Do we use this codepath only for HTTPS, or does anybody use other protocol cURL supports over SSL with this, too?
-- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "msysGit" group. To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.