Skip to content

Commit 11811c1

Browse files
nodejs-github-botRafaelGSS
authored andcommitted
deps: update nghttp2 to 1.66.0
PR-URL: #58786 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent 97fbfd8 commit 11811c1

File tree

7 files changed

+42
-11
lines changed

7 files changed

+42
-11
lines changed

deps/nghttp2/lib/Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ LIBNGHTTP3_LIBS = @LIBNGHTTP3_LIBS@
360360
LIBNGTCP2_CFLAGS = @LIBNGTCP2_CFLAGS@
361361
LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS = @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@
362362
LIBNGTCP2_CRYPTO_BORINGSSL_LIBS = @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@
363+
LIBNGTCP2_CRYPTO_OSSL_CFLAGS = @LIBNGTCP2_CRYPTO_OSSL_CFLAGS@
364+
LIBNGTCP2_CRYPTO_OSSL_LIBS = @LIBNGTCP2_CRYPTO_OSSL_LIBS@
363365
LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS = @LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@
364366
LIBNGTCP2_CRYPTO_QUICTLS_LIBS = @LIBNGTCP2_CRYPTO_QUICTLS_LIBS@
365367
LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS = @LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS@

deps/nghttp2/lib/includes/Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ LIBNGHTTP3_LIBS = @LIBNGHTTP3_LIBS@
265265
LIBNGTCP2_CFLAGS = @LIBNGTCP2_CFLAGS@
266266
LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS = @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@
267267
LIBNGTCP2_CRYPTO_BORINGSSL_LIBS = @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@
268+
LIBNGTCP2_CRYPTO_OSSL_CFLAGS = @LIBNGTCP2_CRYPTO_OSSL_CFLAGS@
269+
LIBNGTCP2_CRYPTO_OSSL_LIBS = @LIBNGTCP2_CRYPTO_OSSL_LIBS@
268270
LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS = @LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@
269271
LIBNGTCP2_CRYPTO_QUICTLS_LIBS = @LIBNGTCP2_CRYPTO_QUICTLS_LIBS@
270272
LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS = @LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS@

deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
* @macro
3030
* Version number of the nghttp2 library release
3131
*/
32-
#define NGHTTP2_VERSION "1.65.0"
32+
#define NGHTTP2_VERSION "1.66.0"
3333

3434
/**
3535
* @macro
3636
* Numerical representation of the version number of the nghttp2 library
3737
* release. This is a 24 bit number with 8 bits for major number, 8 bits
3838
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
3939
*/
40-
#define NGHTTP2_VERSION_NUM 0x014100
40+
#define NGHTTP2_VERSION_NUM 0x014200
4141

4242
#endif /* NGHTTP2VER_H */

deps/nghttp2/lib/nghttp2_session.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include "nghttp2_debug.h"
4242
#include "nghttp2_submit.h"
4343

44-
nghttp2_stream root;
44+
nghttp2_stream nghttp2_stream_root;
4545

4646
/*
4747
* Returns non-zero if the number of outgoing opened streams is larger
@@ -1092,6 +1092,15 @@ int nghttp2_session_add_item(nghttp2_session *session,
10921092

10931093
int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
10941094
uint32_t error_code) {
1095+
return nghttp2_session_add_rst_stream_continue(
1096+
session, stream_id, error_code,
1097+
/* continue_without_stream = */ 1);
1098+
}
1099+
1100+
int nghttp2_session_add_rst_stream_continue(nghttp2_session *session,
1101+
int32_t stream_id,
1102+
uint32_t error_code,
1103+
int continue_without_stream) {
10951104
int rv;
10961105
nghttp2_outbound_item *item;
10971106
nghttp2_frame *frame;
@@ -1148,6 +1157,12 @@ int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
11481157
}
11491158
}
11501159

1160+
/* To keep the old behaviour, do not fail if stream was not
1161+
found. */
1162+
if (!continue_without_stream && !stream) {
1163+
return 0;
1164+
}
1165+
11511166
item = nghttp2_mem_malloc(mem, sizeof(nghttp2_outbound_item));
11521167
if (item == NULL) {
11531168
return NGHTTP2_ERR_NOMEM;
@@ -7715,7 +7730,7 @@ int32_t nghttp2_session_get_last_proc_stream_id(nghttp2_session *session) {
77157730
nghttp2_stream *nghttp2_session_find_stream(nghttp2_session *session,
77167731
int32_t stream_id) {
77177732
if (stream_id == 0) {
7718-
return &root;
7733+
return &nghttp2_stream_root;
77197734
}
77207735

77217736
return nghttp2_session_get_stream_raw(session, stream_id);
@@ -7724,7 +7739,7 @@ nghttp2_stream *nghttp2_session_find_stream(nghttp2_session *session,
77247739
nghttp2_stream *nghttp2_session_get_root_stream(nghttp2_session *session) {
77257740
(void)session;
77267741

7727-
return &root;
7742+
return &nghttp2_stream_root;
77287743
}
77297744

77307745
int nghttp2_session_check_server_session(nghttp2_session *session) {

deps/nghttp2/lib/nghttp2_session.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
preface handling. */
4646
extern int nghttp2_enable_strict_preface;
4747

48-
extern nghttp2_stream root;
48+
extern nghttp2_stream nghttp2_stream_root;
4949

5050
/*
5151
* Option flags.
@@ -402,23 +402,34 @@ int nghttp2_session_is_my_stream_id(nghttp2_session *session,
402402
int nghttp2_session_add_item(nghttp2_session *session,
403403
nghttp2_outbound_item *item);
404404

405+
/*
406+
* This function wraps around nghttp2_session_add_rst_stream_continue
407+
* with continue_without_stream = 1.
408+
*/
409+
int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
410+
uint32_t error_code);
411+
405412
/*
406413
* Adds RST_STREAM frame for the stream |stream_id| with the error
407414
* code |error_code|. This is a convenient function built on top of
408415
* nghttp2_session_add_frame() to add RST_STREAM easily.
409416
*
410417
* This function simply returns 0 without adding RST_STREAM frame if
411418
* given stream is in NGHTTP2_STREAM_CLOSING state, because multiple
412-
* RST_STREAM for a stream is redundant.
419+
* RST_STREAM for a stream is redundant. It also returns 0 without
420+
* adding the frame if |continue_without_stream| is nonzero, and
421+
* stream was already gone.
413422
*
414423
* This function returns 0 if it succeeds, or one of the following
415424
* negative error codes:
416425
*
417426
* NGHTTP2_ERR_NOMEM
418427
* Out of memory.
419428
*/
420-
int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
421-
uint32_t error_code);
429+
int nghttp2_session_add_rst_stream_continue(nghttp2_session *session,
430+
int32_t stream_id,
431+
uint32_t error_code,
432+
int continue_without_stream);
422433

423434
/*
424435
* Adds PING frame. This is a convenient function built on top of

deps/nghttp2/lib/nghttp2_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void nghttp2_stream_promise_fulfilled(nghttp2_stream *stream) {
151151
}
152152

153153
nghttp2_stream_proto_state nghttp2_stream_get_state(nghttp2_stream *stream) {
154-
if (stream == &root) {
154+
if (stream == &nghttp2_stream_root) {
155155
return NGHTTP2_STREAM_STATE_IDLE;
156156
}
157157

deps/nghttp2/lib/nghttp2_submit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ int nghttp2_submit_rst_stream(nghttp2_session *session, uint8_t flags,
185185
return NGHTTP2_ERR_INVALID_ARGUMENT;
186186
}
187187

188-
return nghttp2_session_add_rst_stream(session, stream_id, error_code);
188+
return nghttp2_session_add_rst_stream_continue(
189+
session, stream_id, error_code, /* continue_without_stream = */ 0);
189190
}
190191

191192
int nghttp2_submit_goaway(nghttp2_session *session, uint8_t flags,

0 commit comments

Comments
 (0)