diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-04-09 15:08:46 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-04-09 15:08:46 +0200 |
commit | 807bc6739dd6c65f12b35a1d799ba796655169c0 (patch) | |
tree | 4c6754ed1fc86b614951c4bbe345bc64da17cfe5 | |
parent | cb232b13deff65ab3479f4b79af2b1de373be27d (diff) | |
download | curl-bagder/altsvc-debug.tar.gz |
url: allow non-HTTPS altsvc-matching for debug buildsbagder/altsvc-debug
This is already partly supported but this part was missing.
Reported-by: James Fuller
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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; |