Skip to content

Commit 4eb907f

Browse files
addaleaxMylesBorins
authored andcommitted
deps: update nghttp2 to v1.25.0
PR-URL: #14955 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 13577d4 commit 4eb907f

File tree

8 files changed

+135
-103
lines changed

8 files changed

+135
-103
lines changed

deps/nghttp2/lib/Makefile.msvc

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ IMP_D := $(OBJ_DIR)/nghttp2d.lib
5050
TARGETS := $(LIB_R) $(DLL_R) $(IMP_R) \
5151
$(LIB_D) $(DLL_D) $(IMP_D)
5252

53-
EXT_LIBS =
53+
EXT_LIBS =
5454

5555
NGHTTP2_PDB_R := $(OBJ_DIR)/nghttp2.pdb
5656
NGHTTP2_PDB_D := $(OBJ_DIR)/nghttp2d.pdb
@@ -121,7 +121,7 @@ $(OBJ_DIR):
121121

122122
install: includes/nghttp2/nghttp2.h includes/nghttp2/nghttp2ver.h \
123123
$(TARGETS) \
124-
copy_headers_and_libs install_nghttp2_pyd_$(USE_CYTHON)
124+
copy_headers_and_libs install_nghttp2_pyd_$(USE_CYTHON)
125125

126126
#
127127
# This MUST be done before using the 'install_nghttp2_pyd_1' rule.
@@ -144,14 +144,14 @@ $(LIB_D): $(NGHTTP2_OBJ_D)
144144

145145
$(IMP_R): $(DLL_R)
146146

147-
$(DLL_R): $(NGHTTP2_OBJ_R) $(OBJ_DIR)/r_nghttp2.res
147+
$(DLL_R): $(NGHTTP2_OBJ_R) $(OBJ_DIR)/r_nghttp2.res
148148
$(LD) $(LDFLAGS) -dll -out:$@ -implib:$(IMP_R) $(NGHTTP2_OBJ_R) -PDB:$(NGHTTP2_PDB_R) $(OBJ_DIR)/r_nghttp2.res $(EXT_LIBS)
149149
mt -nologo -manifest [email protected] -outputresource:$@\;2
150150
@echo
151151

152152
$(IMP_D): $(DLL_D)
153-
154-
$(DLL_D): $(NGHTTP2_OBJ_D) $(OBJ_DIR)/d_nghttp2.res
153+
154+
$(DLL_D): $(NGHTTP2_OBJ_D) $(OBJ_DIR)/d_nghttp2.res
155155
$(LD) $(LDFLAGS) -dll -out:$@ -implib:$(IMP_D) $(NGHTTP2_OBJ_D) -PDB:$(NGHTTP2_PDB_D) $(OBJ_DIR)/d_nghttp2.res $(EXT_LIBS)
156156
mt -nologo -manifest [email protected] -outputresource:$@\;2
157157
@echo
@@ -174,7 +174,7 @@ build_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
174174
python setup.py build_ext -i -f bdist_wininst
175175

176176
install_nghttp2_pyd_0: ;
177-
177+
178178
install_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
179179
cd ../python ; \
180180
pip install .

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

+19-13
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,9 @@ NGHTTP2_EXTERN nghttp2_vec nghttp2_rcbuf_get_buf(nghttp2_rcbuf *rcbuf);
472472
/**
473473
* @function
474474
*
475-
* Returns 1 if the underlying buffer is statically allocated,
476-
* and 0 otherwise. This can be useful for language bindings that wish to avoid
477-
* creating duplicate strings for these buffers.
475+
* Returns nonzero if the underlying buffer is statically allocated,
476+
* and 0 otherwise. This can be useful for language bindings that wish
477+
* to avoid creating duplicate strings for these buffers.
478478
*/
479479
NGHTTP2_EXTERN int nghttp2_rcbuf_is_static(const nghttp2_rcbuf *rcbuf);
480480

@@ -1750,11 +1750,12 @@ typedef int (*nghttp2_on_header_callback2)(nghttp2_session *session,
17501750
* The parameter and behaviour are similar to
17511751
* :type:`nghttp2_on_header_callback`. The difference is that this
17521752
* callback is only invoked when a invalid header name/value pair is
1753-
* received which is silently ignored if this callback is not set.
1754-
* Only invalid regular header field are passed to this callback. In
1755-
* other words, invalid pseudo header field is not passed to this
1756-
* callback. Also header fields which includes upper cased latter are
1757-
* also treated as error without passing them to this callback.
1753+
* received which is treated as stream error if this callback is not
1754+
* set. Only invalid regular header field are passed to this
1755+
* callback. In other words, invalid pseudo header field is not
1756+
* passed to this callback. Also header fields which includes upper
1757+
* cased latter are also treated as error without passing them to this
1758+
* callback.
17581759
*
17591760
* This callback is only considered if HTTP messaging validation is
17601761
* turned on (which is on by default, see
@@ -1763,10 +1764,13 @@ typedef int (*nghttp2_on_header_callback2)(nghttp2_session *session,
17631764
* With this callback, application inspects the incoming invalid
17641765
* field, and it also can reset stream from this callback by returning
17651766
* :enum:`NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE`. By default, the
1766-
* error code is :enum:`NGHTTP2_INTERNAL_ERROR`. To change the error
1767+
* error code is :enum:`NGHTTP2_PROTOCOL_ERROR`. To change the error
17671768
* code, call `nghttp2_submit_rst_stream()` with the error code of
17681769
* choice in addition to returning
17691770
* :enum:`NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE`.
1771+
*
1772+
* If 0 is returned, the header field is ignored, and the stream is
1773+
* not reset.
17701774
*/
17711775
typedef int (*nghttp2_on_invalid_header_callback)(
17721776
nghttp2_session *session, const nghttp2_frame *frame, const uint8_t *name,
@@ -2457,7 +2461,10 @@ nghttp2_option_set_no_recv_client_magic(nghttp2_option *option, int val);
24572461
* <https://tools.ietf.org/html/rfc7540#section-8>`_. See
24582462
* :ref:`http-messaging` section for details. For those applications
24592463
* who use nghttp2 library as non-HTTP use, give nonzero to |val| to
2460-
* disable this enforcement.
2464+
* disable this enforcement. Please note that disabling this feature
2465+
* does not change the fundamental client and server model of HTTP.
2466+
* That is, even if the validation is disabled, only client can send
2467+
* requests.
24612468
*/
24622469
NGHTTP2_EXTERN void nghttp2_option_set_no_http_messaging(nghttp2_option *option,
24632470
int val);
@@ -3811,9 +3818,8 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
38113818
* Submits trailer fields HEADERS against the stream |stream_id|.
38123819
*
38133820
* The |nva| is an array of name/value pair :type:`nghttp2_nv` with
3814-
* |nvlen| elements. The application is responsible not to include
3815-
* pseudo-header fields (header field whose name starts with ":") in
3816-
* |nva|.
3821+
* |nvlen| elements. The application must not include pseudo-header
3822+
* fields (headers whose names starts with ":") in |nva|.
38173823
*
38183824
* This function creates copies of all name/value pairs in |nva|. It
38193825
* also lower-cases all names in |nva|. The order of elements in

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.22.0"
32+
#define NGHTTP2_VERSION "1.21.0-DEV"
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 0x011600
40+
#define NGHTTP2_VERSION_NUM 0x011500
4141

4242
#endif /* NGHTTP2VER_H */

deps/nghttp2/lib/nghttp2_frame.c

+3
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,9 @@ int nghttp2_frame_pack_altsvc(nghttp2_bufs *bufs, nghttp2_extension *frame) {
672672
nghttp2_buf *buf;
673673
nghttp2_ext_altsvc *altsvc;
674674

675+
/* This is required with --disable-assert. */
676+
(void)rv;
677+
675678
altsvc = frame->payload;
676679

677680
buf = &bufs->head->buf;

deps/nghttp2/lib/nghttp2_hd.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,9 @@ static int hd_context_init(nghttp2_hd_context *context, nghttp2_mem *mem) {
662662
context->mem = mem;
663663
context->bad = 0;
664664
context->hd_table_bufsize_max = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE;
665-
rv = hd_ringbuf_init(&context->hd_table, context->hd_table_bufsize_max /
666-
NGHTTP2_HD_ENTRY_OVERHEAD,
667-
mem);
665+
rv = hd_ringbuf_init(
666+
&context->hd_table,
667+
context->hd_table_bufsize_max / NGHTTP2_HD_ENTRY_OVERHEAD, mem);
668668
if (rv != 0) {
669669
return rv;
670670
}

deps/nghttp2/lib/nghttp2_pq.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef struct {
4242
nghttp2_pq_entry **q;
4343
/* Memory allocator */
4444
nghttp2_mem *mem;
45-
/* The number of items sotred */
45+
/* The number of items stored */
4646
size_t length;
4747
/* The maximum number of items this pq can store. This is
4848
automatically extended when length is reached to this value. */

0 commit comments

Comments
 (0)