summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-03-03 11:17:52 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-03-03 11:17:52 +0100
commit5345b04a43765afbb13f956d6f15160e8e56f3d5 (patch)
tree0d73ef4925c5867783a8b2cd7a395be4c33ed097 /lib
parentc51c78dd8d93990d7168a7f6b2410ec437e66939 (diff)
downloadcurl-5345b04a43765afbb13f956d6f15160e8e56f3d5.tar.gz
alt-svc: add test 355 and 356 to verify with command line curl
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c9
1 files changed, 8 insertions, 1 deletions
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,