mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:43:31 +03:00
http2: discard frames with no SessionHandle
Return 0 instead of NGHTTP2_ERR_CALLBACK_FAILURE if we can't locate the SessionHandle. Apparently mod_h2 will sometimes send a frame for a stream_id we're finished with. Use nghttp2_session_get_stream_user_data and nghttp2_session_set_stream_user_data to identify SessionHandles instead of a hash. Closes #372
This commit is contained in:
parent
c8a656d3c7
commit
5778e6f526
3 changed files with 111 additions and 140 deletions
|
|
@ -1443,7 +1443,10 @@ CURLcode Curl_http_done(struct connectdata *conn,
|
|||
CURLcode status, bool premature)
|
||||
{
|
||||
struct SessionHandle *data = conn->data;
|
||||
struct HTTP *http =data->req.protop;
|
||||
struct HTTP *http = data->req.protop;
|
||||
#ifdef USE_NGHTTP2
|
||||
struct http_conn *httpc = &conn->proto.httpc;
|
||||
#endif
|
||||
|
||||
Curl_unencode_cleanup(conn);
|
||||
|
||||
|
|
@ -1482,6 +1485,10 @@ CURLcode Curl_http_done(struct connectdata *conn,
|
|||
free(http->push_headers);
|
||||
http->push_headers = NULL;
|
||||
}
|
||||
if(http->stream_id) {
|
||||
nghttp2_session_set_stream_user_data(httpc->h2, http->stream_id, 0);
|
||||
http->stream_id = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(HTTPREQ_POST_FORM == data->set.httpreq) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue