From 5345b04a43765afbb13f956d6f15160e8e56f3d5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 3 Mar 2019 11:17:52 +0100 Subject: alt-svc: add test 355 and 356 to verify with command line curl --- lib/http.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index f5709b68b..3618f8728 100644 --- a/lib/http.c +++ b/lib/http.c @@ -3982,7 +3982,14 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, #ifdef USE_ALTSVC /* If enabled, the header is incoming and this is over HTTPS */ else if(data->asi && checkprefix("Alt-Svc:", k->p) && - (conn->handler->flags & PROTOPT_SSL)) { + ((conn->handler->flags & PROTOPT_SSL) || +#ifdef CURLDEBUG + /* allow debug builds to circumvent the HTTPS restriction */ + getenv("CURL_ALTSVC_HTTP") +#else + 0 +#endif + )) { /* the ALPN of the current request */ enum alpnid id = (conn->httpversion == 20) ? ALPN_h2 : ALPN_h1; result = Curl_altsvc_parse(data, data->asi, -- cgit v1.2.3