From: Daniel Stenberg Date: Thu, 9 Apr 2020 13:08:46 +0000 (+0200) Subject: url: allow non-HTTPS altsvc-matching for debug builds X-Git-Tag: curl-7_70_0~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4afa0fc2076ee0184cf8120d83ac997e8c57692;p=thirdparty%2Fcurl.git url: allow non-HTTPS altsvc-matching for debug builds This is already partly supported but this part was missing. Reported-by: James Fuller Closes #5205 --- diff --git a/lib/url.c b/lib/url.c index 47fc66aedd..4c62b50ec3 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3040,7 +3040,14 @@ static CURLcode parse_connect_to_slist(struct Curl_easy *data, #ifdef USE_ALTSVC if(data->asi && !host && (port == -1) && - (conn->handler->protocol == CURLPROTO_HTTPS)) { + ((conn->handler->protocol == CURLPROTO_HTTPS) || +#ifdef CURLDEBUG + /* allow debug builds to circumvent the HTTPS restriction */ + getenv("CURL_ALTSVC_HTTP") +#else + 0 +#endif + )) { /* no connect_to match, try alt-svc! */ enum alpnid srcalpnid; bool hit;