From 8deeae8d544f8cf6806338aba9cf246a686e1223 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Sun, 2 Aug 2026 00:53:34 +0000 Subject: [PATCH] deps: update nghttp3 to 1.18.0 --- .../nghttp3/lib/includes/nghttp3/nghttp3.h | 127 +++++++++++++++++- .../nghttp3/lib/includes/nghttp3/version.h | 4 +- deps/ngtcp2/nghttp3/lib/nghttp3_callbacks.c | 3 + deps/ngtcp2/nghttp3/lib/nghttp3_conn.c | 51 +++++-- deps/ngtcp2/nghttp3/lib/nghttp3_ksl.c | 22 +-- deps/ngtcp2/nghttp3/lib/nghttp3_qpack.c | 54 +++++--- deps/ngtcp2/nghttp3/lib/nghttp3_qpack.h | 8 +- deps/ngtcp2/nghttp3/lib/nghttp3_stream.c | 1 - deps/ngtcp2/nghttp3/lib/nghttp3_stream.h | 2 - 9 files changed, 222 insertions(+), 50 deletions(-) diff --git a/deps/ngtcp2/nghttp3/lib/includes/nghttp3/nghttp3.h b/deps/ngtcp2/nghttp3/lib/includes/nghttp3/nghttp3.h index 83999a34d17b..d3dd9217d4b0 100644 --- a/deps/ngtcp2/nghttp3/lib/includes/nghttp3/nghttp3.h +++ b/deps/ngtcp2/nghttp3/lib/includes/nghttp3/nghttp3.h @@ -1961,7 +1961,7 @@ typedef int (*nghttp3_acked_stream_data)(nghttp3_conn *conn, int64_t stream_id, /** * @functypedef * - * :type:`nghttp3_conn_stream_close` is a callback function which is + * :type:`nghttp3_stream_close` is a callback function which is * invoked when a stream identified by |stream_id| is closed. QUIC * application error code |app_error_code| indicates the reason of * this closure. @@ -1970,6 +1970,9 @@ typedef int (*nghttp3_acked_stream_data)(nghttp3_conn *conn, int64_t stream_id, * Returning :macro:`NGHTTP3_ERR_CALLBACK_FAILURE` will return to the * caller immediately. Any values other than 0 is treated as * :macro:`NGHTTP3_ERR_CALLBACK_FAILURE`. + * + * .. seealso:: + * :type:`nghttp3_stream_close2` */ typedef int (*nghttp3_stream_close)(nghttp3_conn *conn, int64_t stream_id, uint64_t app_error_code, @@ -2240,10 +2243,80 @@ typedef int (*nghttp3_recv_settings2)(nghttp3_conn *conn, const nghttp3_proto_settings *settings, void *conn_user_data); +/** + * @macrosection + * + * Stream close flags + */ + +/** + * @macro + * + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_NONE` indicates no flag set. + * + * .. version-added:: 1.18.0 + */ +#define NGHTTP3_STREAM_CLOSE_FLAG_NONE 0x00U + +/** + * @macro + * + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET` indicates + * that rx_app_error_code parameter is set. + * + * .. version-added:: 1.18.0 + */ +#define NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET 0x01U + +/** + * @macro + * + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SET` indicates + * that tx_app_error_code parameter is set. + * + * .. version-added:: 1.18.0 + */ +#define NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SET 0x02U + +/** + * @functypedef + * + * :type:`nghttp3_stream_close2` is a callback function which is + * invoked when a stream identified by |stream_id| is closed. If + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET` is set in + * |flags|, |rx_app_error_code| is the QUIC application error code + * that shut down the receiving side of the stream. If + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SET` is set in + * |flags|, |tx_app_error_code| is the QUIC application error code + * that shut down the sending side of the stream. No application code + * means that direction of stream is closed without any error. + * + * This callback should be used with `nghttp3_conn_close_stream2`. If + * `nghttp3_conn_close_stream` is used, the app_error_code is set to + * both |rx_app_error_code| and |tx_app_error_code|, and + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET` and + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SET` are set in + * |flags|. + * + * The implementation of this callback must return 0 if it succeeds. + * Returning :macro:`NGHTTP3_ERR_CALLBACK_FAILURE` will return to the + * caller immediately. Any values other than 0 is treated as + * :macro:`NGHTTP3_ERR_CALLBACK_FAILURE`. + * + * .. version-added:: 1.18.0 + */ +typedef int (*nghttp3_stream_close2)(nghttp3_conn *conn, uint32_t flags, + int64_t stream_id, + uint64_t rx_app_error_code, + uint64_t tx_app_error_code, + void *conn_user_data, + void *stream_user_data); + #define NGHTTP3_CALLBACKS_V1 1 #define NGHTTP3_CALLBACKS_V2 2 #define NGHTTP3_CALLBACKS_V3 3 -#define NGHTTP3_CALLBACKS_VERSION NGHTTP3_CALLBACKS_V3 +#define NGHTTP3_CALLBACKS_V4 4 +#define NGHTTP3_CALLBACKS_VERSION NGHTTP3_CALLBACKS_V4 /** * @struct @@ -2260,6 +2333,9 @@ typedef struct nghttp3_callbacks { /** * :member:`stream_close` is a callback function which is invoked * when a particular stream has closed. + * + * .. seealso:: + * :member:`stream_close2` */ nghttp3_stream_close stream_close; /** @@ -2368,6 +2444,8 @@ typedef struct nghttp3_callbacks { * .. version-added:: 1.11.0 */ nghttp3_rand rand; + /* The following fields have been added since + NGHTTP3_CALLBACKS_V3. */ /** * :member:`recv_settings2` is a callback function which is invoked * when SETTINGS frame is received. @@ -2375,6 +2453,15 @@ typedef struct nghttp3_callbacks { * .. version-added:: 1.14.0 */ nghttp3_recv_settings2 recv_settings2; + /* The following fields have been added since + NGHTTP3_CALLBACKS_V4. */ + /** + * :member:`stream_close2` is a callback function which is invoked + * when a particular stream has closed. + * + * .. version-added:: 1.18.0 + */ + nghttp3_stream_close2 stream_close2; } nghttp3_callbacks; /** @@ -2837,11 +2924,47 @@ NGHTTP3_EXTERN int nghttp3_conn_resume_stream(nghttp3_conn *conn, * A critical stream is closed. * :macro:`NGHTTP3_ERR_CALLBACK_FAILURE` * User callback failed + * + * .. seealso:: + * `nghttp3_conn_close_stream2` */ NGHTTP3_EXTERN int nghttp3_conn_close_stream(nghttp3_conn *conn, int64_t stream_id, uint64_t app_error_code); +/** + * @function + * + * `nghttp3_conn_close_stream2` tells the library that a stream + * identified by |stream_id| has been closed. If + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET` is set in + * |flags|, |rx_app_error_code| is the QUIC application error code + * that shut down the receiving side of the stream. Similarly, + * :macro:`NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SET` is set in + * |flags|, |tx_app_error_code| is the QUIC application error code + * that shut down the sending side of the stream. + * + * For stream close callback, prefer + * :member:`nghttp3_callbacks.stream_close2` to + * :member:`nghttp3_callbacks.stream_close`. + * + * This function returns 0 if it succeeds, or one of the following + * negative error codes: + * + * :macro:`NGHTTP3_ERR_STREAM_NOT_FOUND` + * Stream not found. + * :macro:`NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAM` + * A critical stream is closed. + * :macro:`NGHTTP3_ERR_CALLBACK_FAILURE` + * User callback failed + * + * .. version-added:: 1.18.0 + */ +NGHTTP3_EXTERN int nghttp3_conn_close_stream2(nghttp3_conn *conn, + uint32_t flags, int64_t stream_id, + uint64_t rx_app_error_code, + uint64_t tx_app_error_code); + /** * @macrosection * diff --git a/deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h b/deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h index 6f9f04e7426b..adb41c1c7b2d 100644 --- a/deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h +++ b/deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h @@ -31,7 +31,7 @@ * * Version number of the nghttp3 library release. */ -#define NGHTTP3_VERSION "1.17.0" +#define NGHTTP3_VERSION "1.18.0" /** * @macro @@ -41,6 +41,6 @@ * number, 8 bits for minor and 8 bits for patch. Version 1.2.3 * becomes 0x010203. */ -#define NGHTTP3_VERSION_NUM 0x011100 +#define NGHTTP3_VERSION_NUM 0x011200 #endif /* !defined(NGHTTP3_VERSION_H) */ diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_callbacks.c b/deps/ngtcp2/nghttp3/lib/nghttp3_callbacks.c index 283f479b0d34..441c707af90f 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_callbacks.c +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_callbacks.c @@ -66,6 +66,9 @@ size_t nghttp3_callbackslen_version(int callbacks_version) { switch (callbacks_version) { case NGHTTP3_CALLBACKS_VERSION: return sizeof(callbacks); + case NGHTTP3_CALLBACKS_V3: + return offsetof(nghttp3_callbacks, recv_settings2) + + sizeof(callbacks.recv_settings2); case NGHTTP3_CALLBACKS_V2: return offsetof(nghttp3_callbacks, rand) + sizeof(callbacks.rand); case NGHTTP3_CALLBACKS_V1: diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_conn.c b/deps/ngtcp2/nghttp3/lib/nghttp3_conn.c index d1b6355bb7e0..04b50ac3b632 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_conn.c +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_conn.c @@ -623,7 +623,9 @@ static nghttp3_ssize conn_read_type(nghttp3_conn *conn, nghttp3_stream *stream, return nread; } -static int conn_delete_stream(nghttp3_conn *conn, nghttp3_stream *stream); +static int conn_delete_stream(nghttp3_conn *conn, nghttp3_stream *stream, + uint32_t flags, uint64_t rx_app_error_code, + uint64_t tx_app_error_code); nghttp3_ssize nghttp3_conn_read_uni(nghttp3_conn *conn, nghttp3_stream *stream, const uint8_t *src, size_t srclen, int fin, @@ -649,7 +651,8 @@ nghttp3_ssize nghttp3_conn_read_uni(nghttp3_conn *conn, nghttp3_stream *stream, return NGHTTP3_ERR_H3_EXCESSIVE_LOAD; } - return conn_delete_stream(conn, stream); + return conn_delete_stream(conn, stream, NGHTTP3_STREAM_CLOSE_FLAG_NONE, 0, + 0); } nread = conn_read_type(conn, stream, src, srclen, fin); if (nread < 0) { @@ -1200,7 +1203,7 @@ nghttp3_ssize nghttp3_conn_read_control(nghttp3_conn *conn, for (; conn->rx.originlen_offset < sizeof(conn->rx.originlen) && (size_t)nread < len; ++conn->rx.originlen_offset, ++nread) { - conn->rx.originlen <<= 8; + conn->rx.originlen *= 256; conn->rx.originlen += *p++; } @@ -1335,8 +1338,11 @@ nghttp3_ssize nghttp3_conn_read_control(nghttp3_conn *conn, return (nghttp3_ssize)nconsumed; } -static int conn_delete_stream(nghttp3_conn *conn, nghttp3_stream *stream) { +static int conn_delete_stream(nghttp3_conn *conn, nghttp3_stream *stream, + uint32_t flags, uint64_t rx_app_error_code, + uint64_t tx_app_error_code) { int rv; + uint64_t app_error_code; rv = conn_call_deferred_consume(conn, stream, nghttp3_stream_get_buffered_datalen(stream)); @@ -1353,8 +1359,26 @@ static int conn_delete_stream(nghttp3_conn *conn, nghttp3_stream *stream) { } } - if (conn->callbacks.stream_close) { - rv = conn->callbacks.stream_close(conn, stream->node.id, stream->error_code, + if (conn->callbacks.stream_close2) { + rv = conn->callbacks.stream_close2(conn, flags, stream->node.id, + rx_app_error_code, tx_app_error_code, + conn->user_data, stream->user_data); + if (rv != 0) { + return NGHTTP3_ERR_CALLBACK_FAILURE; + } + } else if (conn->callbacks.stream_close) { + app_error_code = NGHTTP3_H3_NO_ERROR; + + if (flags & NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET) { + app_error_code = rx_app_error_code; + } + + if (app_error_code == NGHTTP3_H3_NO_ERROR && + (flags & NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SET)) { + app_error_code = tx_app_error_code; + } + + rv = conn->callbacks.stream_close(conn, stream->node.id, app_error_code, conn->user_data, stream->user_data); if (rv != 0) { return NGHTTP3_ERR_CALLBACK_FAILURE; @@ -2725,6 +2749,16 @@ int nghttp3_conn_resume_stream(nghttp3_conn *conn, int64_t stream_id) { int nghttp3_conn_close_stream(nghttp3_conn *conn, int64_t stream_id, uint64_t app_error_code) { + return nghttp3_conn_close_stream2( + conn, + NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET | + NGHTTP3_STREAM_CLOSE_FLAG_TX_APP_ERROR_CODE_SET, + stream_id, app_error_code, app_error_code); +} + +int nghttp3_conn_close_stream2(nghttp3_conn *conn, uint32_t flags, + int64_t stream_id, uint64_t rx_app_error_code, + uint64_t tx_app_error_code) { nghttp3_stream *stream = nghttp3_conn_find_stream(conn, stream_id); if (stream == NULL) { @@ -2736,11 +2770,10 @@ int nghttp3_conn_close_stream(nghttp3_conn *conn, int64_t stream_id, return NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAM; } - stream->error_code = app_error_code; - nghttp3_conn_unschedule_stream(conn, stream); - return conn_delete_stream(conn, stream); + return conn_delete_stream(conn, stream, flags, rx_app_error_code, + tx_app_error_code); } int nghttp3_conn_shutdown_stream_read(nghttp3_conn *conn, int64_t stream_id) { diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_ksl.c b/deps/ngtcp2/nghttp3/lib/nghttp3_ksl.c index efb4f958a85e..4ab9b81fde0c 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_ksl.c +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_ksl.c @@ -37,8 +37,11 @@ static nghttp3_ksl_blk null_blk; nghttp3_objalloc_def(ksl_blk, nghttp3_ksl_blk, oplent) +#define NGHTTP3_KSL_ALIGNED_BLKLEN \ + ((sizeof(nghttp3_ksl_blk) + 0x7U) & ~(size_t)0x7U) + static size_t ksl_blklen(size_t aligned_keylen) { - return sizeof(nghttp3_ksl_blk) + NGHTTP3_KSL_MAX_NBLK * aligned_keylen; + return NGHTTP3_KSL_ALIGNED_BLKLEN + NGHTTP3_KSL_MAX_NBLK * aligned_keylen; } /* @@ -80,7 +83,7 @@ static nghttp3_ksl_blk *ksl_blk_objalloc_new(nghttp3_ksl *ksl) { return NULL; } - blk->keys = (uint8_t *)blk + sizeof(*blk); + blk->keys = (uint8_t *)blk + NGHTTP3_KSL_ALIGNED_BLKLEN; blk->aligned_keylen = (uint16_t)ksl->aligned_keylen; return blk; @@ -223,22 +226,21 @@ static int ksl_split_node(nghttp3_ksl *ksl, nghttp3_ksl_blk *blk, size_t i) { * Out of memory. */ static int ksl_split_root(nghttp3_ksl *ksl) { - nghttp3_ksl_blk *rblk = NULL, *lblk, *nroot = NULL; + nghttp3_ksl_blk *rblk, *lblk, *nroot; + + nroot = ksl_blk_objalloc_new(ksl); + if (nroot == NULL) { + return NGHTTP3_ERR_NOMEM; + } rblk = ksl_split_blk(ksl, ksl->root); if (rblk == NULL) { + ksl_blk_objalloc_del(ksl, nroot); return NGHTTP3_ERR_NOMEM; } lblk = ksl->root; - nroot = ksl_blk_objalloc_new(ksl); - - if (nroot == NULL) { - ksl_blk_objalloc_del(ksl, rblk); - return NGHTTP3_ERR_NOMEM; - } - nroot->next = nroot->prev = NULL; nroot->n = 2; nroot->leaf = 0; diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.c b/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.c index 59b633ea0572..8e950a201d89 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.c +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.c @@ -2820,6 +2820,7 @@ nghttp3_ssize nghttp3_qpack_decoder_read_encoder(nghttp3_qpack_decoder *decoder, int busy = 0; const nghttp3_mem *mem = decoder->ctx.mem; nghttp3_ssize nread; + size_t huff_declen; int rfin; if (decoder->ctx.bad) { @@ -2958,13 +2959,16 @@ nghttp3_ssize nghttp3_qpack_decoder_read_encoder(nghttp3_qpack_decoder *decoder, } if (decoder->rstate.huffman_encoded) { + huff_declen = nghttp3_qpack_huffman_estimate_decode_length( + (size_t)decoder->rstate.left); + if (huff_declen > NGHTTP3_QPACK_MAX_NAMELEN) { + rv = NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE; + goto fail; + } + decoder->state = NGHTTP3_QPACK_ES_STATE_READ_NAME_HUFFMAN; nghttp3_qpack_huffman_decode_context_init(&decoder->rstate.huffman_ctx); - rv = nghttp3_rcbuf_new(&decoder->rstate.name, - nghttp3_qpack_huffman_estimate_decode_length( - (size_t)decoder->rstate.left) + - 1, - mem); + rv = nghttp3_rcbuf_new(&decoder->rstate.name, huff_declen + 1, mem); } else { decoder->state = NGHTTP3_QPACK_ES_STATE_READ_NAME; rv = nghttp3_rcbuf_new(&decoder->rstate.name, @@ -3043,13 +3047,16 @@ nghttp3_ssize nghttp3_qpack_decoder_read_encoder(nghttp3_qpack_decoder *decoder, } if (decoder->rstate.huffman_encoded) { + huff_declen = nghttp3_qpack_huffman_estimate_decode_length( + (size_t)decoder->rstate.left); + if (huff_declen > NGHTTP3_QPACK_MAX_VALUELEN) { + rv = NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE; + goto fail; + } + decoder->state = NGHTTP3_QPACK_ES_STATE_READ_VALUE_HUFFMAN; nghttp3_qpack_huffman_decode_context_init(&decoder->rstate.huffman_ctx); - rv = nghttp3_rcbuf_new(&decoder->rstate.value, - nghttp3_qpack_huffman_estimate_decode_length( - (size_t)decoder->rstate.left) + - 1, - mem); + rv = nghttp3_rcbuf_new(&decoder->rstate.value, huff_declen + 1, mem); } else { decoder->state = NGHTTP3_QPACK_ES_STATE_READ_VALUE; rv = nghttp3_rcbuf_new(&decoder->rstate.value, @@ -3342,6 +3349,7 @@ nghttp3_qpack_decoder_read_request(nghttp3_qpack_decoder *decoder, nghttp3_ssize nread; int rfin; const nghttp3_mem *mem = decoder->ctx.mem; + size_t huff_declen; if (decoder->ctx.bad) { return NGHTTP3_ERR_QPACK_FATAL; @@ -3565,13 +3573,16 @@ nghttp3_qpack_decoder_read_request(nghttp3_qpack_decoder *decoder, } if (sctx->rstate.huffman_encoded) { + huff_declen = nghttp3_qpack_huffman_estimate_decode_length( + (size_t)sctx->rstate.left); + if (huff_declen > NGHTTP3_QPACK_MAX_NAMELEN) { + rv = NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE; + goto fail; + } + sctx->state = NGHTTP3_QPACK_RS_STATE_READ_NAME_HUFFMAN; nghttp3_qpack_huffman_decode_context_init(&sctx->rstate.huffman_ctx); - rv = nghttp3_rcbuf_new(&sctx->rstate.name, - nghttp3_qpack_huffman_estimate_decode_length( - (size_t)sctx->rstate.left) + - 1, - mem); + rv = nghttp3_rcbuf_new(&sctx->rstate.name, huff_declen + 1, mem); } else { sctx->state = NGHTTP3_QPACK_RS_STATE_READ_NAME; rv = nghttp3_rcbuf_new(&sctx->rstate.name, @@ -3648,13 +3659,16 @@ nghttp3_qpack_decoder_read_request(nghttp3_qpack_decoder *decoder, } if (sctx->rstate.huffman_encoded) { + huff_declen = nghttp3_qpack_huffman_estimate_decode_length( + (size_t)sctx->rstate.left); + if (huff_declen > NGHTTP3_QPACK_MAX_VALUELEN) { + rv = NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE; + goto fail; + } + sctx->state = NGHTTP3_QPACK_RS_STATE_READ_VALUE_HUFFMAN; nghttp3_qpack_huffman_decode_context_init(&sctx->rstate.huffman_ctx); - rv = nghttp3_rcbuf_new(&sctx->rstate.value, - nghttp3_qpack_huffman_estimate_decode_length( - (size_t)sctx->rstate.left) + - 1, - mem); + rv = nghttp3_rcbuf_new(&sctx->rstate.value, huff_declen + 1, mem); } else { sctx->state = NGHTTP3_QPACK_RS_STATE_READ_VALUE; rv = nghttp3_rcbuf_new(&sctx->rstate.value, diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.h b/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.h index 2b8dca9d5cf7..934cae77c1bf 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.h +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_qpack.h @@ -42,11 +42,11 @@ #define NGHTTP3_QPACK_INT_MAX ((1ULL << 62) - 1) -/* NGHTTP3_QPACK_MAX_NAMELEN is the maximum (compressed) length of - header name this library can decode. */ +/* NGHTTP3_QPACK_MAX_NAMELEN is the maximum (estimated uncompressed) + length of header name this library can decode. */ #define NGHTTP3_QPACK_MAX_NAMELEN 256 -/* NGHTTP3_QPACK_MAX_VALUELEN is the maximum (compressed) length of - header value this library can decode. */ +/* NGHTTP3_QPACK_MAX_VALUELEN is the maximum (estimated uncompressed) + length of header value this library can decode. */ #define NGHTTP3_QPACK_MAX_VALUELEN 65536 /* NGHTTP3_QPACK_MAX_ENCODERLEN is the maximum encoder stream length that a decoder accepts without completely processing a single field diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_stream.c b/deps/ngtcp2/nghttp3/lib/nghttp3_stream.c index 76db6fe303da..09298006f4f6 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_stream.c +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_stream.c @@ -68,7 +68,6 @@ int nghttp3_stream_new(nghttp3_stream **pstream, int64_t stream_id, .http.content_length = -1, .http.pri.urgency = NGHTTP3_DEFAULT_URGENCY, }, - .error_code = NGHTTP3_H3_NO_ERROR, }; nghttp3_tnode_init(&stream->node, stream_id); diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_stream.h b/deps/ngtcp2/nghttp3/lib/nghttp3_stream.h index 61a1f085ac87..d313b1c192b9 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_stream.h +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_stream.h @@ -225,8 +225,6 @@ struct nghttp3_stream { uint64_t unscheduled_nwrite; nghttp3_stream_type type; nghttp3_stream_read_state rstate; - /* error_code indicates the reason of closure of this stream. */ - uint64_t error_code; struct { uint64_t offset;