diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-05-17 09:05:39 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-05-17 14:44:13 +0200 |
commit | 904b27d18da1f7310f38b5117a0916d8b96d130c (patch) | |
tree | e4a0d92ab07e8ee824c0e788234f563aefc53fec /lib/http2.c | |
parent | 5dfa4c08bbef38f9e533439d11f27096bb09d41c (diff) | |
download | curl-904b27d18da1f7310f38b5117a0916d8b96d130c.tar.gz |
http2: make sure pause is done on HTTP
Since the function is called for any protocol, we can't assume that the
HTTP struct is there without first making sure it is HTTP.
Reported-by: Denis Goleshchikhin
Fixes #7079
Closes #7080
Diffstat (limited to 'lib/http2.c')
-rw-r--r-- | lib/http2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c index ac04d348c..bc604ce15 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -2353,7 +2353,8 @@ CURLcode Curl_http2_stream_pause(struct Curl_easy *data, bool pause) DEBUGASSERT(data); DEBUGASSERT(data->conn); /* if it isn't HTTP/2, we're done */ - if(!data->conn->proto.httpc.h2) + if(!(data->conn->handler->protocol & PROTO_FAMILY_HTTP) || + !data->conn->proto.httpc.h2) return CURLE_OK; #ifdef NGHTTP2_HAS_SET_LOCAL_WINDOW_SIZE else { |