Skip to content

Commit 2161690

Browse files
gengjiawenZYSzys
authored andcommitted
deps: update nghttp2 to 1.38.0
PR-URL: #27295 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Masashi Hirano <[email protected]>
1 parent 8eaf311 commit 2161690

File tree

2 files changed

+52
-50
lines changed

2 files changed

+52
-50
lines changed

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

+2-2
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.37.0"
32+
#define NGHTTP2_VERSION "1.38.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 0x012500
40+
#define NGHTTP2_VERSION_NUM 0x012600
4141

4242
#endif /* NGHTTP2VER_H */

deps/nghttp2/lib/nghttp2_session.c

+50-48
Original file line numberDiff line numberDiff line change
@@ -3619,71 +3619,73 @@ static int inflate_header_block(nghttp2_session *session, nghttp2_frame *frame,
36193619

36203620
if (call_header_cb && (inflate_flags & NGHTTP2_HD_INFLATE_EMIT)) {
36213621
rv = 0;
3622-
if (subject_stream && session_enforce_http_messaging(session)) {
3623-
rv = nghttp2_http_on_header(session, subject_stream, frame, &nv,
3624-
trailer);
3622+
if (subject_stream) {
3623+
if (session_enforce_http_messaging(session)) {
3624+
rv = nghttp2_http_on_header(session, subject_stream, frame, &nv,
3625+
trailer);
36253626

3626-
if (rv == NGHTTP2_ERR_IGN_HTTP_HEADER) {
3627-
/* Don't overwrite rv here */
3628-
int rv2;
3627+
if (rv == NGHTTP2_ERR_IGN_HTTP_HEADER) {
3628+
/* Don't overwrite rv here */
3629+
int rv2;
36293630

3630-
rv2 = session_call_on_invalid_header(session, frame, &nv);
3631-
if (rv2 == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
3632-
rv = NGHTTP2_ERR_HTTP_HEADER;
3633-
} else {
3634-
if (rv2 != 0) {
3635-
return rv2;
3631+
rv2 = session_call_on_invalid_header(session, frame, &nv);
3632+
if (rv2 == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
3633+
rv = NGHTTP2_ERR_HTTP_HEADER;
3634+
} else {
3635+
if (rv2 != 0) {
3636+
return rv2;
3637+
}
3638+
3639+
/* header is ignored */
3640+
DEBUGF("recv: HTTP ignored: type=%u, id=%d, header %.*s: %.*s\n",
3641+
frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3642+
nv.name->base, (int)nv.value->len, nv.value->base);
3643+
3644+
rv2 = session_call_error_callback(
3645+
session, NGHTTP2_ERR_HTTP_HEADER,
3646+
"Ignoring received invalid HTTP header field: frame type: "
3647+
"%u, stream: %d, name: [%.*s], value: [%.*s]",
3648+
frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3649+
nv.name->base, (int)nv.value->len, nv.value->base);
3650+
3651+
if (nghttp2_is_fatal(rv2)) {
3652+
return rv2;
3653+
}
36363654
}
3655+
}
36373656

3638-
/* header is ignored */
3639-
DEBUGF("recv: HTTP ignored: type=%u, id=%d, header %.*s: %.*s\n",
3657+
if (rv == NGHTTP2_ERR_HTTP_HEADER) {
3658+
DEBUGF("recv: HTTP error: type=%u, id=%d, header %.*s: %.*s\n",
36403659
frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
36413660
nv.name->base, (int)nv.value->len, nv.value->base);
36423661

3643-
rv2 = session_call_error_callback(
3662+
rv = session_call_error_callback(
36443663
session, NGHTTP2_ERR_HTTP_HEADER,
3645-
"Ignoring received invalid HTTP header field: frame type: "
3664+
"Invalid HTTP header field was received: frame type: "
36463665
"%u, stream: %d, name: [%.*s], value: [%.*s]",
36473666
frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
36483667
nv.name->base, (int)nv.value->len, nv.value->base);
36493668

3650-
if (nghttp2_is_fatal(rv2)) {
3651-
return rv2;
3669+
if (nghttp2_is_fatal(rv)) {
3670+
return rv;
36523671
}
3653-
}
3654-
}
3655-
3656-
if (rv == NGHTTP2_ERR_HTTP_HEADER) {
3657-
DEBUGF("recv: HTTP error: type=%u, id=%d, header %.*s: %.*s\n",
3658-
frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3659-
nv.name->base, (int)nv.value->len, nv.value->base);
36603672

3661-
rv = session_call_error_callback(
3662-
session, NGHTTP2_ERR_HTTP_HEADER,
3663-
"Invalid HTTP header field was received: frame type: "
3664-
"%u, stream: %d, name: [%.*s], value: [%.*s]",
3665-
frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3666-
nv.name->base, (int)nv.value->len, nv.value->base);
3667-
3668-
if (nghttp2_is_fatal(rv)) {
3669-
return rv;
3673+
rv = session_handle_invalid_stream2(session,
3674+
subject_stream->stream_id,
3675+
frame, NGHTTP2_ERR_HTTP_HEADER);
3676+
if (nghttp2_is_fatal(rv)) {
3677+
return rv;
3678+
}
3679+
return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
36703680
}
3671-
3672-
rv =
3673-
session_handle_invalid_stream2(session, subject_stream->stream_id,
3674-
frame, NGHTTP2_ERR_HTTP_HEADER);
3675-
if (nghttp2_is_fatal(rv)) {
3681+
}
3682+
if (rv == 0) {
3683+
rv = session_call_on_header(session, frame, &nv);
3684+
/* This handles NGHTTP2_ERR_PAUSE and
3685+
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE as well */
3686+
if (rv != 0) {
36763687
return rv;
36773688
}
3678-
return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
3679-
}
3680-
}
3681-
if (rv == 0) {
3682-
rv = session_call_on_header(session, frame, &nv);
3683-
/* This handles NGHTTP2_ERR_PAUSE and
3684-
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE as well */
3685-
if (rv != 0) {
3686-
return rv;
36873689
}
36883690
}
36893691
}

0 commit comments

Comments
 (0)