diff --git a/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h b/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h index 8dfe536dec9ade..95acef22beaf9d 100644 --- a/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h +++ b/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h @@ -29,7 +29,7 @@ * @macro * Version number of the nghttp2 library release */ -#define NGHTTP2_VERSION "1.68.0" +#define NGHTTP2_VERSION "1.68.1" /** * @macro @@ -37,6 +37,6 @@ * release. This is a 24 bit number with 8 bits for major number, 8 bits * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. */ -#define NGHTTP2_VERSION_NUM 0x014400 +#define NGHTTP2_VERSION_NUM 0x014401 #endif /* NGHTTP2VER_H */ diff --git a/deps/nghttp2/lib/nghttp2_frame.c b/deps/nghttp2/lib/nghttp2_frame.c index edc2aaaae9ed75..264ae9d38e0260 100644 --- a/deps/nghttp2/lib/nghttp2_frame.c +++ b/deps/nghttp2/lib/nghttp2_frame.c @@ -750,6 +750,16 @@ void nghttp2_frame_unpack_altsvc_payload(nghttp2_extension *frame, uint8_t *p; altsvc = frame->payload; + + if (payloadlen == 0) { + altsvc->origin = NULL; + altsvc->origin_len = 0; + altsvc->field_value = NULL; + altsvc->field_value_len = 0; + + return; + } + p = payload; altsvc->origin = p; diff --git a/deps/nghttp2/lib/nghttp2_session.c b/deps/nghttp2/lib/nghttp2_session.c index 97d7fda1d295d5..42464bdeb79cdb 100644 --- a/deps/nghttp2/lib/nghttp2_session.c +++ b/deps/nghttp2/lib/nghttp2_session.c @@ -5469,6 +5469,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, busy = 1; rv = session_on_data_received_fail_fast(session); + if (nghttp2_is_fatal(rv)) { + return rv; + } + if (iframe->state == NGHTTP2_IB_IGN_ALL) { return (nghttp2_ssize)inlen; } @@ -5489,10 +5493,6 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, break; } - if (nghttp2_is_fatal(rv)) { - return rv; - } - rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd); if (rv < 0) { rv = nghttp2_session_terminate_session_with_reason( @@ -5576,6 +5576,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, return rv; } + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } + on_begin_frame_called = 1; rv = session_process_headers_frame(session); @@ -6044,6 +6048,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, if (nghttp2_is_fatal(rv)) { return rv; } + + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } } } @@ -6296,6 +6304,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, return rv; } + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } + session_inbound_frame_reset(session); break; @@ -6598,6 +6610,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, if (nghttp2_is_fatal(rv)) { return rv; } + + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } } else { iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK; } @@ -6777,13 +6793,17 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, rv = session->callbacks.on_data_chunk_recv_callback( session, iframe->frame.hd.flags, iframe->frame.hd.stream_id, in - readlen, (size_t)data_readlen, session->user_data); - if (rv == NGHTTP2_ERR_PAUSE) { - return (nghttp2_ssize)(in - first); - } - if (nghttp2_is_fatal(rv)) { return NGHTTP2_ERR_CALLBACK_FAILURE; } + + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } + + if (rv == NGHTTP2_ERR_PAUSE) { + return (nghttp2_ssize)(in - first); + } } } } @@ -6863,6 +6883,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, return rv; } + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } + if (rv != 0) { busy = 1; @@ -6881,6 +6905,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, return rv; } + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } + session_inbound_frame_reset(session); break; @@ -6909,6 +6937,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, return rv; } + if (iframe->state == NGHTTP2_IB_IGN_ALL) { + return (nghttp2_ssize)inlen; + } + session_inbound_frame_reset(session); break;