Martin Bašti 3eff1c5092
http_proxy: do not crash with HTTPS_PROXY and NO_PROXY set
... in case NO_PROXY takes an effect

Without this patch, the following command crashes:

    $ GIT_CURL_VERBOSE=1 NO_PROXY=github.com HTTPS_PROXY=https://example.com \
        git clone https://github.com/curl/curl.git

Minimal libcurl-based reproducer:

    #include <curl/curl.h>

    int main() {
      CURL *curl = curl_easy_init();
      if(curl) {
        CURLcode ret;
        curl_easy_setopt(curl, CURLOPT_URL, "https://github.com/");
        curl_easy_setopt(curl, CURLOPT_PROXY, "example.com");
        /* set the proxy type */
        curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
        curl_easy_setopt(curl, CURLOPT_NOPROXY, "github.com");
        curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
        ret = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
        return ret;
      }
      return -1;
    }

Assisted-by: Kamil Dudka
Bug: https://bugzilla.redhat.com/1873327
Closes #5902
2020-09-03 08:01:56 +02:00
..
2020-09-02 22:41:58 +02:00
2020-09-02 22:41:58 +02:00
2019-03-15 10:22:42 +01:00
2019-03-15 10:22:42 +01:00
2020-09-02 22:41:58 +02:00
2020-09-02 22:41:58 +02:00
2020-08-31 09:45:09 +02:00
2020-05-14 18:13:27 +02:00
2019-11-08 14:51:42 +01:00
2019-11-08 14:51:42 +01:00
2020-08-03 23:43:24 +02:00
2019-11-08 14:51:42 +01:00
2020-09-02 22:41:58 +02:00
2020-04-25 11:15:49 +02:00
2020-08-24 08:41:48 +02:00
2019-11-08 14:51:42 +01:00
2019-11-08 14:51:42 +01:00
2020-09-02 22:41:58 +02:00
2020-09-02 22:41:58 +02:00
2020-09-02 22:41:58 +02:00
2020-09-02 22:41:58 +02:00
2019-11-08 14:51:42 +01:00
2020-08-03 23:43:24 +02:00
2020-07-14 17:53:45 +02:00
2020-08-03 23:43:24 +02:00
2020-05-14 18:13:27 +02:00
2019-11-08 14:51:42 +01:00
2019-11-08 14:51:42 +01:00
2020-09-02 22:41:58 +02:00
2020-09-02 22:41:58 +02:00
2020-08-31 09:45:09 +02:00
2020-09-02 22:41:58 +02:00
2020-09-02 22:41:58 +02:00
2019-05-17 23:24:34 +02:00
2020-09-01 16:02:27 +02:00
2020-07-28 23:51:17 +02:00
2019-11-08 14:51:42 +01:00
2020-02-18 07:49:15 +01:00
2019-11-08 14:51:42 +01:00
2020-09-02 22:41:59 +02:00
2019-11-08 14:51:42 +01:00
2019-11-08 14:51:42 +01:00
2020-05-25 19:44:04 +00:00
2020-05-25 19:44:04 +00:00
2020-08-24 08:41:48 +02:00
2020-08-24 08:41:48 +02:00
2020-07-18 12:37:25 +02:00
2020-08-24 08:41:48 +02:00
2019-11-08 14:51:42 +01:00
2019-11-08 14:51:42 +01:00
2019-11-08 14:51:42 +01:00
2020-02-19 08:04:35 +01:00
2020-08-31 09:45:09 +02:00