mirror of
https://github.com/moparisthebest/curl
synced 2025-03-03 18:59:46 -05:00
http2: use nghttp2_session_upgrade2 instead of nghttp2_session_upgrade
Following the upstream deprecation of nghttp2_session_upgrade. Also provides further checks for requests with the HEAD method. Closes #7041
This commit is contained in:
parent
1e19eceb50
commit
651a75e1e7
@ -2273,10 +2273,10 @@ CURLcode Curl_http2_switched(struct Curl_easy *data,
|
|||||||
/* stream 1 is opened implicitly on upgrade */
|
/* stream 1 is opened implicitly on upgrade */
|
||||||
stream->stream_id = 1;
|
stream->stream_id = 1;
|
||||||
/* queue SETTINGS frame (again) */
|
/* queue SETTINGS frame (again) */
|
||||||
rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings,
|
rv = nghttp2_session_upgrade2(httpc->h2, httpc->binsettings, httpc->binlen,
|
||||||
httpc->binlen, NULL);
|
data->state.httpreq == HTTPREQ_HEAD, NULL);
|
||||||
if(rv) {
|
if(rv) {
|
||||||
failf(data, "nghttp2_session_upgrade() failed: %s(%d)",
|
failf(data, "nghttp2_session_upgrade2() failed: %s(%d)",
|
||||||
nghttp2_strerror(rv), rv);
|
nghttp2_strerror(rv), rv);
|
||||||
return CURLE_HTTP2;
|
return CURLE_HTTP2;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user