mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
deps: update nghttp2 to 1.66.0
PR-URL: https://github.com/nodejs/node/pull/58786 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
parent
97fbfd82af
commit
11811c15da
7 changed files with 42 additions and 11 deletions
2
deps/nghttp2/lib/Makefile.in
vendored
2
deps/nghttp2/lib/Makefile.in
vendored
|
@ -360,6 +360,8 @@ LIBNGHTTP3_LIBS = @LIBNGHTTP3_LIBS@
|
|||
LIBNGTCP2_CFLAGS = @LIBNGTCP2_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS = @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_BORINGSSL_LIBS = @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@
|
||||
LIBNGTCP2_CRYPTO_OSSL_CFLAGS = @LIBNGTCP2_CRYPTO_OSSL_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_OSSL_LIBS = @LIBNGTCP2_CRYPTO_OSSL_LIBS@
|
||||
LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS = @LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_QUICTLS_LIBS = @LIBNGTCP2_CRYPTO_QUICTLS_LIBS@
|
||||
LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS = @LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS@
|
||||
|
|
2
deps/nghttp2/lib/includes/Makefile.in
vendored
2
deps/nghttp2/lib/includes/Makefile.in
vendored
|
@ -265,6 +265,8 @@ LIBNGHTTP3_LIBS = @LIBNGHTTP3_LIBS@
|
|||
LIBNGTCP2_CFLAGS = @LIBNGTCP2_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS = @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_BORINGSSL_LIBS = @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@
|
||||
LIBNGTCP2_CRYPTO_OSSL_CFLAGS = @LIBNGTCP2_CRYPTO_OSSL_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_OSSL_LIBS = @LIBNGTCP2_CRYPTO_OSSL_LIBS@
|
||||
LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS = @LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@
|
||||
LIBNGTCP2_CRYPTO_QUICTLS_LIBS = @LIBNGTCP2_CRYPTO_QUICTLS_LIBS@
|
||||
LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS = @LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS@
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* @macro
|
||||
* Version number of the nghttp2 library release
|
||||
*/
|
||||
#define NGHTTP2_VERSION "1.65.0"
|
||||
#define NGHTTP2_VERSION "1.66.0"
|
||||
|
||||
/**
|
||||
* @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 0x014100
|
||||
#define NGHTTP2_VERSION_NUM 0x014200
|
||||
|
||||
#endif /* NGHTTP2VER_H */
|
||||
|
|
21
deps/nghttp2/lib/nghttp2_session.c
vendored
21
deps/nghttp2/lib/nghttp2_session.c
vendored
|
@ -41,7 +41,7 @@
|
|||
#include "nghttp2_debug.h"
|
||||
#include "nghttp2_submit.h"
|
||||
|
||||
nghttp2_stream root;
|
||||
nghttp2_stream nghttp2_stream_root;
|
||||
|
||||
/*
|
||||
* Returns non-zero if the number of outgoing opened streams is larger
|
||||
|
@ -1092,6 +1092,15 @@ int nghttp2_session_add_item(nghttp2_session *session,
|
|||
|
||||
int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
|
||||
uint32_t error_code) {
|
||||
return nghttp2_session_add_rst_stream_continue(
|
||||
session, stream_id, error_code,
|
||||
/* continue_without_stream = */ 1);
|
||||
}
|
||||
|
||||
int nghttp2_session_add_rst_stream_continue(nghttp2_session *session,
|
||||
int32_t stream_id,
|
||||
uint32_t error_code,
|
||||
int continue_without_stream) {
|
||||
int rv;
|
||||
nghttp2_outbound_item *item;
|
||||
nghttp2_frame *frame;
|
||||
|
@ -1148,6 +1157,12 @@ int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
|
|||
}
|
||||
}
|
||||
|
||||
/* To keep the old behaviour, do not fail if stream was not
|
||||
found. */
|
||||
if (!continue_without_stream && !stream) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
item = nghttp2_mem_malloc(mem, sizeof(nghttp2_outbound_item));
|
||||
if (item == NULL) {
|
||||
return NGHTTP2_ERR_NOMEM;
|
||||
|
@ -7715,7 +7730,7 @@ int32_t nghttp2_session_get_last_proc_stream_id(nghttp2_session *session) {
|
|||
nghttp2_stream *nghttp2_session_find_stream(nghttp2_session *session,
|
||||
int32_t stream_id) {
|
||||
if (stream_id == 0) {
|
||||
return &root;
|
||||
return &nghttp2_stream_root;
|
||||
}
|
||||
|
||||
return nghttp2_session_get_stream_raw(session, stream_id);
|
||||
|
@ -7724,7 +7739,7 @@ nghttp2_stream *nghttp2_session_find_stream(nghttp2_session *session,
|
|||
nghttp2_stream *nghttp2_session_get_root_stream(nghttp2_session *session) {
|
||||
(void)session;
|
||||
|
||||
return &root;
|
||||
return &nghttp2_stream_root;
|
||||
}
|
||||
|
||||
int nghttp2_session_check_server_session(nghttp2_session *session) {
|
||||
|
|
19
deps/nghttp2/lib/nghttp2_session.h
vendored
19
deps/nghttp2/lib/nghttp2_session.h
vendored
|
@ -45,7 +45,7 @@
|
|||
preface handling. */
|
||||
extern int nghttp2_enable_strict_preface;
|
||||
|
||||
extern nghttp2_stream root;
|
||||
extern nghttp2_stream nghttp2_stream_root;
|
||||
|
||||
/*
|
||||
* Option flags.
|
||||
|
@ -402,6 +402,13 @@ int nghttp2_session_is_my_stream_id(nghttp2_session *session,
|
|||
int nghttp2_session_add_item(nghttp2_session *session,
|
||||
nghttp2_outbound_item *item);
|
||||
|
||||
/*
|
||||
* This function wraps around nghttp2_session_add_rst_stream_continue
|
||||
* with continue_without_stream = 1.
|
||||
*/
|
||||
int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
|
||||
uint32_t error_code);
|
||||
|
||||
/*
|
||||
* Adds RST_STREAM frame for the stream |stream_id| with the error
|
||||
* code |error_code|. This is a convenient function built on top of
|
||||
|
@ -409,7 +416,9 @@ int nghttp2_session_add_item(nghttp2_session *session,
|
|||
*
|
||||
* This function simply returns 0 without adding RST_STREAM frame if
|
||||
* given stream is in NGHTTP2_STREAM_CLOSING state, because multiple
|
||||
* RST_STREAM for a stream is redundant.
|
||||
* RST_STREAM for a stream is redundant. It also returns 0 without
|
||||
* adding the frame if |continue_without_stream| is nonzero, and
|
||||
* stream was already gone.
|
||||
*
|
||||
* This function returns 0 if it succeeds, or one of the following
|
||||
* negative error codes:
|
||||
|
@ -417,8 +426,10 @@ int nghttp2_session_add_item(nghttp2_session *session,
|
|||
* NGHTTP2_ERR_NOMEM
|
||||
* Out of memory.
|
||||
*/
|
||||
int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
|
||||
uint32_t error_code);
|
||||
int nghttp2_session_add_rst_stream_continue(nghttp2_session *session,
|
||||
int32_t stream_id,
|
||||
uint32_t error_code,
|
||||
int continue_without_stream);
|
||||
|
||||
/*
|
||||
* Adds PING frame. This is a convenient function built on top of
|
||||
|
|
2
deps/nghttp2/lib/nghttp2_stream.c
vendored
2
deps/nghttp2/lib/nghttp2_stream.c
vendored
|
@ -151,7 +151,7 @@ void nghttp2_stream_promise_fulfilled(nghttp2_stream *stream) {
|
|||
}
|
||||
|
||||
nghttp2_stream_proto_state nghttp2_stream_get_state(nghttp2_stream *stream) {
|
||||
if (stream == &root) {
|
||||
if (stream == &nghttp2_stream_root) {
|
||||
return NGHTTP2_STREAM_STATE_IDLE;
|
||||
}
|
||||
|
||||
|
|
3
deps/nghttp2/lib/nghttp2_submit.c
vendored
3
deps/nghttp2/lib/nghttp2_submit.c
vendored
|
@ -185,7 +185,8 @@ int nghttp2_submit_rst_stream(nghttp2_session *session, uint8_t flags,
|
|||
return NGHTTP2_ERR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
return nghttp2_session_add_rst_stream(session, stream_id, error_code);
|
||||
return nghttp2_session_add_rst_stream_continue(
|
||||
session, stream_id, error_code, /* continue_without_stream = */ 0);
|
||||
}
|
||||
|
||||
int nghttp2_submit_goaway(nghttp2_session *session, uint8_t flags,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue