GeezerVison is showing github.com — deps: update nghttp2 to 1.70.0 · nodejs/node@4a87ad6
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/Makefile.in +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -329,7 +329,7 @@ EXTRA_DEFS = @EXTRA_DEFS@ | 329 | 329 | FGREP = @FGREP@ | 330 | 330 | FILECMD = @FILECMD@ | 331 | 331 | GREP = @GREP@ | 332 | | -HAVE_CXX20 = @HAVE_CXX20@ | | 332 | +HAVE_CXX23 = @HAVE_CXX23@ | 333 | 333 | INSTALL = @INSTALL@ | 334 | 334 | INSTALL_DATA = @INSTALL_DATA@ | 335 | 335 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/includes/Makefile.in +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -234,7 +234,7 @@ EXTRA_DEFS = @EXTRA_DEFS@ | 234 | 234 | FGREP = @FGREP@ | 235 | 235 | FILECMD = @FILECMD@ | 236 | 236 | GREP = @GREP@ | 237 | | -HAVE_CXX20 = @HAVE_CXX20@ | | 237 | +HAVE_CXX23 = @HAVE_CXX23@ | 238 | 238 | INSTALL = @INSTALL@ | 239 | 239 | INSTALL_DATA = @INSTALL_DATA@ | 240 | 240 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/includes/nghttp2/nghttp2.h +7-7Lines changed: 7 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -664,12 +664,12 @@ typedef enum { | 664 | 664 | * The ALTSVC frame, which is defined in `RFC 7383 | 665 | 665 | * <https://tools.ietf.org/html/rfc7838#section-4>`_. | 666 | 666 | */ | 667 | | - NGHTTP2_ALTSVC = 0x0a, | | 667 | + NGHTTP2_ALTSVC = 0x0A, | 668 | 668 | /** | 669 | 669 | * The ORIGIN frame, which is defined by `RFC 8336 | 670 | 670 | * <https://tools.ietf.org/html/rfc8336>`_. | 671 | 671 | */ | 672 | | - NGHTTP2_ORIGIN = 0x0c, | | 672 | + NGHTTP2_ORIGIN = 0x0C, | 673 | 673 | /** | 674 | 674 | * The PRIORITY_UPDATE frame, which is defined by :rfc:`9218`. | 675 | 675 | */ | @@ -756,7 +756,7 @@ typedef enum { | 756 | 756 | * | 757 | 757 | * .. warning:: | 758 | 758 | * | 759 | | - * Deprecated. The initial max concurrent streams is 0xffffffffu. | | 759 | + * Deprecated. The initial max concurrent streams is 0xFFFFFFFFU. | 760 | 760 | * | 761 | 761 | * Default maximum number of incoming concurrent streams. Use | 762 | 762 | * `nghttp2_submit_settings()` with | @@ -818,19 +818,19 @@ typedef enum { | 818 | 818 | /** | 819 | 819 | * CONNECT_ERROR | 820 | 820 | */ | 821 | | - NGHTTP2_CONNECT_ERROR = 0x0a, | | 821 | + NGHTTP2_CONNECT_ERROR = 0x0A, | 822 | 822 | /** | 823 | 823 | * ENHANCE_YOUR_CALM | 824 | 824 | */ | 825 | | - NGHTTP2_ENHANCE_YOUR_CALM = 0x0b, | | 825 | + NGHTTP2_ENHANCE_YOUR_CALM = 0x0B, | 826 | 826 | /** | 827 | 827 | * INADEQUATE_SECURITY | 828 | 828 | */ | 829 | | - NGHTTP2_INADEQUATE_SECURITY = 0x0c, | | 829 | + NGHTTP2_INADEQUATE_SECURITY = 0x0C, | 830 | 830 | /** | 831 | 831 | * HTTP_1_1_REQUIRED | 832 | 832 | */ | 833 | | - NGHTTP2_HTTP_1_1_REQUIRED = 0x0d | | 833 | + NGHTTP2_HTTP_1_1_REQUIRED = 0x0D | 834 | 834 | } nghttp2_error_code; | 835 | 835 |
| 836 | 836 | /** | |
Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 29 | 29 | * @macro | 30 | 30 | * Version number of the nghttp2 library release | 31 | 31 | */ | 32 | | -#define NGHTTP2_VERSION "1.69.0" | | 32 | +#define NGHTTP2_VERSION "1.70.0" | 33 | 33 |
| 34 | 34 | /** | 35 | 35 | * @macro | 36 | 36 | * Numerical representation of the version number of the nghttp2 library | 37 | 37 | * release. This is a 24 bit number with 8 bits for major number, 8 bits | 38 | 38 | * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. | 39 | 39 | */ | 40 | | -#define NGHTTP2_VERSION_NUM 0x014500 | | 40 | +#define NGHTTP2_VERSION_NUM 0x014600 | 41 | 41 |
| 42 | 42 | #endif /* NGHTTP2VER_H */ |
Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/nghttp2_buf.c +19-28Lines changed: 19 additions & 28 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 29 | 29 | #include "nghttp2_helper.h" | 30 | 30 | #include "nghttp2_debug.h" | 31 | 31 |
| 32 | | -void nghttp2_buf_init(nghttp2_buf *buf) { | 33 | | - buf->begin = NULL; | 34 | | - buf->end = NULL; | 35 | | - buf->pos = NULL; | 36 | | - buf->last = NULL; | 37 | | - buf->mark = NULL; | 38 | | -} | | 32 | +void nghttp2_buf_init(nghttp2_buf *buf) { *buf = (nghttp2_buf){0}; } | 39 | 33 |
| 40 | 34 | int nghttp2_buf_init2(nghttp2_buf *buf, size_t initial, nghttp2_mem *mem) { | 41 | 35 | nghttp2_buf_init(buf); | @@ -212,16 +206,15 @@ int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len, | 212 | 206 |
| 213 | 207 | nghttp2_buf_wrap_init(&chain->buf, begin, len); | 214 | 208 |
| 215 | | - bufs->mem = mem; | 216 | | - bufs->offset = 0; | 217 | | - | 218 | | - bufs->head = chain; | 219 | | - bufs->cur = bufs->head; | 220 | | - | 221 | | - bufs->chunk_length = len; | 222 | | - bufs->chunk_used = 1; | 223 | | - bufs->max_chunk = 1; | 224 | | - bufs->chunk_keep = 1; | | 209 | + *bufs = (nghttp2_bufs){ | | 210 | + .head = chain, | | 211 | + .cur = chain, | | 212 | + .mem = mem, | | 213 | + .chunk_length = len, | | 214 | + .max_chunk = 1, | | 215 | + .chunk_used = 1, | | 216 | + .chunk_keep = 1, | | 217 | + }; | 225 | 218 |
| 226 | 219 | return 0; | 227 | 220 | } | @@ -251,17 +244,15 @@ int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, const nghttp2_vec *vec, | 251 | 244 | dst_chain = &cur_chain->next; | 252 | 245 | } | 253 | 246 |
| 254 | | - bufs->mem = mem; | 255 | | - bufs->offset = 0; | 256 | | - | 257 | | - bufs->head = head_chain; | 258 | | - bufs->cur = bufs->head; | 259 | | - | 260 | | - /* We don't use chunk_length since no allocation is expected. */ | 261 | | - bufs->chunk_length = 0; | 262 | | - bufs->chunk_used = veclen; | 263 | | - bufs->max_chunk = veclen; | 264 | | - bufs->chunk_keep = veclen; | | 247 | + *bufs = (nghttp2_bufs){ | | 248 | + .head = head_chain, | | 249 | + .cur = head_chain, | | 250 | + .mem = mem, | | 251 | + /* We don't use chunk_length since no allocation is expected. */ | | 252 | + .max_chunk = veclen, | | 253 | + .chunk_used = veclen, | | 254 | + .chunk_keep = veclen, | | 255 | + }; | 265 | 256 |
| 266 | 257 | return 0; | 267 | 258 | } | |
Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/nghttp2_extpri.c +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,8 +31,10 @@ uint8_t nghttp2_extpri_to_uint8(const nghttp2_extpri *extpri) { | 31 | 31 | } | 32 | 32 |
| 33 | 33 | void nghttp2_extpri_from_uint8(nghttp2_extpri *extpri, uint8_t u8extpri) { | 34 | | - extpri->urgency = nghttp2_extpri_uint8_urgency(u8extpri); | 35 | | - extpri->inc = nghttp2_extpri_uint8_inc(u8extpri); | | 34 | + *extpri = (nghttp2_extpri){ | | 35 | + .urgency = nghttp2_extpri_uint8_urgency(u8extpri), | | 36 | + .inc = nghttp2_extpri_uint8_inc(u8extpri), | | 37 | + }; | 36 | 38 | } | 37 | 39 |
| 38 | 40 | int nghttp2_extpri_parse_priority(nghttp2_extpri *extpri, const uint8_t *value, | |
Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/nghttp2_extpri.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 36 | 36 | * NGHTTP2_EXTPRI_INC_MASK is a bit mask to retrieve incremental bit | 37 | 37 | * from a value produced by nghttp2_extpri_to_uint8. | 38 | 38 | */ | 39 | | -#define NGHTTP2_EXTPRI_INC_MASK (1 << 7) | | 39 | +#define NGHTTP2_EXTPRI_INC_MASK 0x80U | 40 | 40 |
| 41 | 41 | /* | 42 | 42 | * nghttp2_extpri_to_uint8 encodes |pri| into uint8_t variable. | |
Collapse file Copy file name to clipboardExpand all lines: deps/nghttp2/lib/nghttp2_frame.c +42-39Lines changed: 42 additions & 39 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,20 +43,22 @@ void nghttp2_frame_pack_frame_hd(uint8_t *buf, const nghttp2_frame_hd *hd) { | 43 | 43 | } | 44 | 44 |
| 45 | 45 | void nghttp2_frame_unpack_frame_hd(nghttp2_frame_hd *hd, const uint8_t *buf) { | 46 | | - hd->length = nghttp2_get_uint32(&buf[0]) >> 8; | 47 | | - hd->type = buf[3]; | 48 | | - hd->flags = buf[4]; | 49 | | - hd->stream_id = nghttp2_get_uint32(&buf[5]) & NGHTTP2_STREAM_ID_MASK; | 50 | | - hd->reserved = 0; | | 46 | + *hd = (nghttp2_frame_hd){ | | 47 | + .length = nghttp2_get_uint32(&buf[0]) >> 8, | | 48 | + .stream_id = nghttp2_get_uint32(&buf[5]) & NGHTTP2_STREAM_ID_MASK, | | 49 | + .type = buf[3], | | 50 | + .flags = buf[4], | | 51 | + }; | 51 | 52 | } | 52 | 53 |
| 53 | 54 | void nghttp2_frame_hd_init(nghttp2_frame_hd *hd, size_t length, uint8_t type, | 54 | 55 | uint8_t flags, int32_t stream_id) { | 55 | | - hd->length = length; | 56 | | - hd->type = type; | 57 | | - hd->flags = flags; | 58 | | - hd->stream_id = stream_id; | 59 | | - hd->reserved = 0; | | 56 | + *hd = (nghttp2_frame_hd){ | | 57 | + .length = length, | | 58 | + .stream_id = stream_id, | | 59 | + .type = type, | | 60 | + .flags = flags, | | 61 | + }; | 60 | 62 | } | 61 | 63 |
| 62 | 64 | void nghttp2_frame_headers_init(nghttp2_headers *frame, uint8_t flags, | @@ -199,16 +201,15 @@ void nghttp2_frame_extension_free(nghttp2_extension *frame) { (void)frame; } | 199 | 201 | void nghttp2_frame_altsvc_init(nghttp2_extension *frame, int32_t stream_id, | 200 | 202 | uint8_t *origin, size_t origin_len, | 201 | 203 | uint8_t *field_value, size_t field_value_len) { | 202 | | - nghttp2_ext_altsvc *altsvc; | 203 | | - | 204 | 204 | nghttp2_frame_hd_init(&frame->hd, 2 + origin_len + field_value_len, | 205 | 205 | NGHTTP2_ALTSVC, NGHTTP2_FLAG_NONE, stream_id); | 206 | 206 |
| 207 | | - altsvc = frame->payload; | 208 | | - altsvc->origin = origin; | 209 | | - altsvc->origin_len = origin_len; | 210 | | - altsvc->field_value = field_value; | 211 | | - altsvc->field_value_len = field_value_len; | | 207 | + *(nghttp2_ext_altsvc *)frame->payload = (nghttp2_ext_altsvc){ | | 208 | + .origin = origin, | | 209 | + .origin_len = origin_len, | | 210 | + .field_value = field_value, | | 211 | + .field_value_len = field_value_len, | | 212 | + }; | 212 | 213 | } | 213 | 214 |
| 214 | 215 | void nghttp2_frame_altsvc_free(nghttp2_extension *frame, nghttp2_mem *mem) { | @@ -225,7 +226,6 @@ void nghttp2_frame_altsvc_free(nghttp2_extension *frame, nghttp2_mem *mem) { | 225 | 226 |
| 226 | 227 | void nghttp2_frame_origin_init(nghttp2_extension *frame, | 227 | 228 | nghttp2_origin_entry *ov, size_t nov) { | 228 | | - nghttp2_ext_origin *origin; | 229 | 229 | size_t payloadlen = 0; | 230 | 230 | size_t i; | 231 | 231 |
| @@ -236,9 +236,10 @@ void nghttp2_frame_origin_init(nghttp2_extension *frame, | 236 | 236 | nghttp2_frame_hd_init(&frame->hd, payloadlen, NGHTTP2_ORIGIN, | 237 | 237 | NGHTTP2_FLAG_NONE, 0); | 238 | 238 |
| 239 | | - origin = frame->payload; | 240 | | - origin->ov = ov; | 241 | | - origin->nov = nov; | | 239 | + *(nghttp2_ext_origin *)frame->payload = (nghttp2_ext_origin){ | | 240 | + .ov = ov, | | 241 | + .nov = nov, | | 242 | + }; | 242 | 243 | } | 243 | 244 |
| 244 | 245 | void nghttp2_frame_origin_free(nghttp2_extension *frame, nghttp2_mem *mem) { | @@ -256,15 +257,15 @@ void nghttp2_frame_origin_free(nghttp2_extension *frame, nghttp2_mem *mem) { | 256 | 257 | void nghttp2_frame_priority_update_init(nghttp2_extension *frame, | 257 | 258 | int32_t stream_id, uint8_t *field_value, | 258 | 259 | size_t field_value_len) { | 259 | | - nghttp2_ext_priority_update *priority_update; | 260 | | - | 261 | 260 | nghttp2_frame_hd_init(&frame->hd, 4 + field_value_len, | 262 | 261 | NGHTTP2_PRIORITY_UPDATE, NGHTTP2_FLAG_NONE, 0); | 263 | 262 |
| 264 | | - priority_update = frame->payload; | 265 | | - priority_update->stream_id = stream_id; | 266 | | - priority_update->field_value = field_value; | 267 | | - priority_update->field_value_len = field_value_len; | | 263 | + *(nghttp2_ext_priority_update *)frame->payload = | | 264 | + (nghttp2_ext_priority_update){ | | 265 | + .stream_id = stream_id, | | 266 | + .field_value = field_value, | | 267 | + .field_value_len = field_value_len, | | 268 | + }; | 268 | 269 | } | 269 | 270 |
| 270 | 271 | void nghttp2_frame_priority_update_free(nghttp2_extension *frame, | @@ -517,8 +518,10 @@ void nghttp2_frame_unpack_settings_payload(nghttp2_settings *frame, | 517 | 518 |
| 518 | 519 | void nghttp2_frame_unpack_settings_entry(nghttp2_settings_entry *iv, | 519 | 520 | const uint8_t *payload) { | 520 | | - iv->settings_id = nghttp2_get_uint16(&payload[0]); | 521 | | - iv->value = nghttp2_get_uint32(&payload[2]); | | 521 | + *iv = (nghttp2_settings_entry){ | | 522 | + .settings_id = nghttp2_get_uint16(&payload[0]), | | 523 | + .value = nghttp2_get_uint32(&payload[2]), | | 524 | + }; | 522 | 525 | } | 523 | 526 |
| 524 | 527 | int nghttp2_frame_unpack_settings_payload2(nghttp2_settings_entry **iv_ptr, | @@ -752,10 +755,7 @@ void nghttp2_frame_unpack_altsvc_payload(nghttp2_extension *frame, | 752 | 755 | altsvc = frame->payload; | 753 | 756 |
| 754 | 757 | if (payloadlen == 0) { | 755 | | - altsvc->origin = NULL; | 756 | | - altsvc->origin_len = 0; | 757 | | - altsvc->field_value = NULL; | 758 | | - altsvc->field_value_len = 0; | | 758 | + *altsvc = (nghttp2_ext_altsvc){0}; | 759 | 759 |
| 760 | 760 | return; | 761 | 761 | } | @@ -862,8 +862,7 @@ int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame, | 862 | 862 | } | 863 | 863 |
| 864 | 864 | if (nov == 0) { | 865 | | - origin->ov = NULL; | 866 | | - origin->nov = 0; | | 865 | + *origin = (nghttp2_ext_origin){0}; | 867 | 866 |
| 868 | 867 | return 0; | 869 | 868 | } | @@ -875,8 +874,10 @@ int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame, | 875 | 874 | return NGHTTP2_ERR_NOMEM; | 876 | 875 | } | 877 | 876 |
| 878 | | - origin->ov = ov; | 879 | | - origin->nov = nov; | | 877 | + *origin = (nghttp2_ext_origin){ | | 878 | + .nov = nov, | | 879 | + .ov = ov, | | 880 | + }; | 880 | 881 |
| 881 | 882 | dst = (uint8_t *)ov + nov * sizeof(nghttp2_origin_entry); | 882 | 883 | p = payload; | @@ -887,8 +888,10 @@ int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame, | 887 | 888 | if (originlen == 0) { | 888 | 889 | continue; | 889 | 890 | } | 890 | | - ov->origin = dst; | 891 | | - ov->origin_len = originlen; | | 891 | + *ov = (nghttp2_origin_entry){ | | 892 | + .origin = dst, | | 893 | + .origin_len = originlen, | | 894 | + }; | 892 | 895 | dst = nghttp2_cpymem(dst, p, originlen); | 893 | 896 | *dst++ = '\0'; | 894 | 897 | p += originlen; | |
|