Просмотр исходного кода

Update contrib/libs/nghttp2 to 1.48.0

ref:b582ac8ce36a77f41a7c33b7a5418e0f28488595
robot-contrib 2 лет назад
Родитель
Сommit
e10c657371

+ 38 - 12
contrib/libs/nghttp2/.yandex_meta/devtools.copyrights.report

@@ -29,6 +29,18 @@
 # FILE_INCLUDE - include all file data into licenses text file
 # =======================
 
+KEEP     COPYRIGHT_SERVICE_LABEL 3782c9399af9718cb85783105b7784ae
+BELONGS ya.make
+    License text:
+           Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
+        Software Foundation, Inc.
+    Scancode info:
+        Original SPDX id: COPYRIGHT_SERVICE_LABEL
+        Score           : 100.00
+        Match type      : COPYRIGHT
+    Files with this license:
+        INSTALL [4:5]
+
 KEEP     COPYRIGHT_SERVICE_LABEL 3e6f7a2dce9d6519bf3f2a9eae7e5b6b
 BELONGS ya.make
     License text:
@@ -110,18 +122,6 @@ BELONGS ya.make
         lib/nghttp2_submit.c [4:4]
         lib/nghttp2_version.c [4:4]
 
-KEEP     COPYRIGHT_SERVICE_LABEL 71499817b900aaf04d853fdffdc657b0
-BELONGS ya.make
-    License text:
-           Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
-        Foundation, Inc.
-    Scancode info:
-        Original SPDX id: COPYRIGHT_SERVICE_LABEL
-        Score           : 100.00
-        Match type      : COPYRIGHT
-    Files with this license:
-        INSTALL [4:5]
-
 KEEP     COPYRIGHT_SERVICE_LABEL 7e2d5f433f62e38814cee9a67e1c3cd0
 BELONGS ya.make
     License text:
@@ -192,6 +192,19 @@ BELONGS ya.make
         lib/nghttp2_map.c [4:5]
         lib/nghttp2_map.h [4:5]
 
+KEEP     COPYRIGHT_SERVICE_LABEL bc9503ec48dfbffaed72fd039643c15f
+BELONGS ya.make
+    License text:
+         * Copyright (c) 2022 nghttp3 contributors
+         * Copyright (c) 2022 nghttp2 contributors
+    Scancode info:
+        Original SPDX id: COPYRIGHT_SERVICE_LABEL
+        Score           : 100.00
+        Match type      : COPYRIGHT
+    Files with this license:
+        lib/nghttp2_extpri.c [4:5]
+        lib/nghttp2_extpri.h [4:5]
+
 KEEP     COPYRIGHT_SERVICE_LABEL c812bfe524d8bc74ad8cf40a45902020
 BELONGS ya.make
     License text:
@@ -204,3 +217,16 @@ BELONGS ya.make
     Files with this license:
         lib/nghttp2_map.c [4:5]
         lib/nghttp2_map.h [4:5]
+
+KEEP     COPYRIGHT_SERVICE_LABEL d89f9db9c9889910b44184610d7947e1
+BELONGS ya.make
+    License text:
+         * Copyright (c) 2022 nghttp3 contributors
+         * Copyright (c) 2022 nghttp2 contributors
+    Scancode info:
+        Original SPDX id: COPYRIGHT_SERVICE_LABEL
+        Score           : 100.00
+        Match type      : COPYRIGHT
+    Files with this license:
+        lib/nghttp2_extpri.c [4:5]
+        lib/nghttp2_extpri.h [4:5]

+ 3 - 1
contrib/libs/nghttp2/.yandex_meta/devtools.licenses.report

@@ -69,7 +69,7 @@ BELONGS ya.make
 
 KEEP     MIT                  a3a8f7feced3937b87cd090ba748e24b
 BELONGS ya.make
-FILE_INCLUDE AUTHORS found in files: lib/includes/nghttp2/nghttp2.h at line 20, lib/includes/nghttp2/nghttp2ver.h at line 20, lib/nghttp2_buf.c at line 20, lib/nghttp2_buf.h at line 20, lib/nghttp2_callbacks.c at line 20, lib/nghttp2_callbacks.h at line 20, lib/nghttp2_debug.c at line 20, lib/nghttp2_debug.h at line 20, lib/nghttp2_frame.c at line 20, lib/nghttp2_frame.h at line 20, lib/nghttp2_hd.c at line 20, lib/nghttp2_hd.h at line 20, lib/nghttp2_hd_huffman.c at line 20, lib/nghttp2_hd_huffman.h at line 20, lib/nghttp2_hd_huffman_data.c at line 20, lib/nghttp2_helper.c at line 20, lib/nghttp2_helper.h at line 20, lib/nghttp2_http.c at line 20, lib/nghttp2_http.h at line 20, lib/nghttp2_int.h at line 20, lib/nghttp2_map.c at line 21, lib/nghttp2_map.h at line 21, lib/nghttp2_mem.c at line 20, lib/nghttp2_mem.h at line 20, lib/nghttp2_net.h at line 20, lib/nghttp2_npn.c at line 20, lib/nghttp2_npn.h at line 20, lib/nghttp2_option.c at line 20, lib/nghttp2_option.h at line 20, lib/nghttp2_outbound_item.c at line 20, lib/nghttp2_outbound_item.h at line 20, lib/nghttp2_pq.c at line 20, lib/nghttp2_pq.h at line 20, lib/nghttp2_priority_spec.c at line 20, lib/nghttp2_priority_spec.h at line 20, lib/nghttp2_queue.c at line 20, lib/nghttp2_queue.h at line 20, lib/nghttp2_rcbuf.c at line 20, lib/nghttp2_rcbuf.h at line 20, lib/nghttp2_session.c at line 20, lib/nghttp2_session.h at line 20, lib/nghttp2_stream.c at line 20, lib/nghttp2_stream.h at line 20, lib/nghttp2_submit.c at line 20, lib/nghttp2_submit.h at line 20, lib/nghttp2_version.c at line 20
+FILE_INCLUDE AUTHORS found in files: lib/includes/nghttp2/nghttp2.h at line 20, lib/includes/nghttp2/nghttp2ver.h at line 20, lib/nghttp2_buf.c at line 20, lib/nghttp2_buf.h at line 20, lib/nghttp2_callbacks.c at line 20, lib/nghttp2_callbacks.h at line 20, lib/nghttp2_debug.c at line 20, lib/nghttp2_debug.h at line 20, lib/nghttp2_extpri.c at line 21, lib/nghttp2_extpri.h at line 21, lib/nghttp2_frame.c at line 20, lib/nghttp2_frame.h at line 20, lib/nghttp2_hd.c at line 20, lib/nghttp2_hd.h at line 20, lib/nghttp2_hd_huffman.c at line 20, lib/nghttp2_hd_huffman.h at line 20, lib/nghttp2_hd_huffman_data.c at line 20, lib/nghttp2_helper.c at line 20, lib/nghttp2_helper.h at line 20, lib/nghttp2_http.c at line 20, lib/nghttp2_http.h at line 20, lib/nghttp2_int.h at line 20, lib/nghttp2_map.c at line 21, lib/nghttp2_map.h at line 21, lib/nghttp2_mem.c at line 20, lib/nghttp2_mem.h at line 20, lib/nghttp2_net.h at line 20, lib/nghttp2_npn.c at line 20, lib/nghttp2_npn.h at line 20, lib/nghttp2_option.c at line 20, lib/nghttp2_option.h at line 20, lib/nghttp2_outbound_item.c at line 20, lib/nghttp2_outbound_item.h at line 20, lib/nghttp2_pq.c at line 20, lib/nghttp2_pq.h at line 20, lib/nghttp2_priority_spec.c at line 20, lib/nghttp2_priority_spec.h at line 20, lib/nghttp2_queue.c at line 20, lib/nghttp2_queue.h at line 20, lib/nghttp2_rcbuf.c at line 20, lib/nghttp2_rcbuf.h at line 20, lib/nghttp2_session.c at line 20, lib/nghttp2_session.h at line 20, lib/nghttp2_stream.c at line 20, lib/nghttp2_stream.h at line 20, lib/nghttp2_submit.c at line 20, lib/nghttp2_submit.h at line 20, lib/nghttp2_version.c at line 20
     Note: matched license text is too long. Read it in the source files.
     Scancode info:
         Original SPDX id: MIT
@@ -85,6 +85,8 @@ FILE_INCLUDE AUTHORS found in files: lib/includes/nghttp2/nghttp2.h at line 20,
         lib/nghttp2_callbacks.h [6:23]
         lib/nghttp2_debug.c [6:23]
         lib/nghttp2_debug.h [6:23]
+        lib/nghttp2_extpri.c [7:24]
+        lib/nghttp2_extpri.h [7:24]
         lib/nghttp2_frame.c [6:23]
         lib/nghttp2_frame.h [6:23]
         lib/nghttp2_hd.c [6:23]

+ 7 - 2
contrib/libs/nghttp2/.yandex_meta/licenses.list.txt

@@ -1,6 +1,6 @@
 ====================COPYRIGHT====================
-   Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
-Foundation, Inc.
+   Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
+Software Foundation, Inc.
 
 
 ====================COPYRIGHT====================
@@ -36,6 +36,11 @@ Foundation, Inc.
  * Copyright (c) 2012 nghttp2 contributors
 
 
+====================COPYRIGHT====================
+ * Copyright (c) 2022 nghttp3 contributors
+ * Copyright (c) 2022 nghttp2 contributors
+
+
 ====================COPYRIGHT====================
 Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa
 Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors

+ 1 - 0
contrib/libs/nghttp2/CMakeLists.txt

@@ -23,6 +23,7 @@ target_sources(contrib-libs-nghttp2 PRIVATE
   ${CMAKE_SOURCE_DIR}/contrib/libs/nghttp2/lib/nghttp2_buf.c
   ${CMAKE_SOURCE_DIR}/contrib/libs/nghttp2/lib/nghttp2_callbacks.c
   ${CMAKE_SOURCE_DIR}/contrib/libs/nghttp2/lib/nghttp2_debug.c
+  ${CMAKE_SOURCE_DIR}/contrib/libs/nghttp2/lib/nghttp2_extpri.c
   ${CMAKE_SOURCE_DIR}/contrib/libs/nghttp2/lib/nghttp2_frame.c
   ${CMAKE_SOURCE_DIR}/contrib/libs/nghttp2/lib/nghttp2_hd.c
   ${CMAKE_SOURCE_DIR}/contrib/libs/nghttp2/lib/nghttp2_hd_huffman.c

+ 3 - 3
contrib/libs/nghttp2/INSTALL

@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-   Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
-Foundation, Inc.
+   Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
+Software Foundation, Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -225,7 +225,7 @@ order to use an ANSI C compiler:
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
-   HP-UX 'make' updates targets which have the same time stamps as their
+   HP-UX 'make' updates targets which have the same timestamps as their
 prerequisites, which makes it generally unusable when shipped generated
 files such as 'configure' are involved.  Use GNU 'make' instead.
 

+ 9 - 9
contrib/libs/nghttp2/README.rst

@@ -151,11 +151,11 @@ To enable the experimental HTTP/3 support for h2load and nghttpx, the
 following libraries are required:
 
 * `OpenSSL with QUIC support
-  <https://github.com/quictls/openssl/tree/OpenSSL_1_1_1m+quic>`_; or
+  <https://github.com/quictls/openssl/tree/OpenSSL_1_1_1p+quic>`_; or
   `BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit
-  36a41bf0bf2dd3176f8780e09c03585351f29963)
-* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 0.2.0
-* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 0.2.0
+  27ffcc6e19bbafddf1b59ec0bc6df2904de7eb2c)
+* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 0.6.0
+* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 0.4.0
 
 Use ``--enable-http3`` configure option to enable HTTP/3 feature for
 h2load and nghttpx.
@@ -170,7 +170,7 @@ Use ``--with-libbpf`` configure option to build eBPF program.
 libelf-dev is needed to build libbpf.
 
 For Ubuntu 20.04, you can build libbpf from `the source code
-<https://github.com/libbpf/libbpf/releases/tag/v0.7.0>`_.  nghttpx
+<https://github.com/libbpf/libbpf/releases/tag/v0.8.0>`_.  nghttpx
 requires eBPF program for reloading its configuration and hot swapping
 its executable.
 
@@ -355,7 +355,7 @@ Build custom OpenSSL:
 
 .. code-block:: text
 
-   $ git clone --depth 1 -b OpenSSL_1_1_1m+quic https://github.com/quictls/openssl
+   $ git clone --depth 1 -b OpenSSL_1_1_1p+quic https://github.com/quictls/openssl
    $ cd openssl
    $ ./config --prefix=$PWD/build --openssldir=/etc/ssl
    $ make -j$(nproc)
@@ -366,7 +366,7 @@ Build nghttp3:
 
 .. code-block:: text
 
-   $ git clone --depth 1 -b v0.2.0 https://github.com/ngtcp2/nghttp3
+   $ git clone --depth 1 -b v0.5.0 https://github.com/ngtcp2/nghttp3
    $ cd nghttp3
    $ autoreconf -i
    $ ./configure --prefix=$PWD/build --enable-lib-only
@@ -378,7 +378,7 @@ Build ngtcp2:
 
 .. code-block:: text
 
-   $ git clone --depth 1 -b v0.2.0 https://github.com/ngtcp2/ngtcp2
+   $ git clone --depth 1 -b v0.6.0 https://github.com/ngtcp2/ngtcp2
    $ cd ngtcp2
    $ autoreconf -i
    $ ./configure --prefix=$PWD/build --enable-lib-only \
@@ -392,7 +392,7 @@ from source:
 
 .. code-block:: text
 
-   $ git clone --depth 1 -b v0.7.0 https://github.com/libbpf/libbpf
+   $ git clone --depth 1 -b v0.8.0 https://github.com/libbpf/libbpf
    $ cd libbpf
    $ PREFIX=$PWD/build make -C src install
    $ cd ..

+ 3 - 3
contrib/libs/nghttp2/config.h

@@ -259,7 +259,7 @@
 #define PACKAGE_NAME "nghttp2"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "nghttp2 1.47.0"
+#define PACKAGE_STRING "nghttp2 1.48.0"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "nghttp2"
@@ -268,7 +268,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.47.0"
+#define PACKAGE_VERSION "1.48.0"
 
 /* The size of `int *', as computed by sizeof. */
 #define SIZEOF_INT_P 8
@@ -373,7 +373,7 @@
 
 
 /* Version number of package */
-#define VERSION "1.47.0"
+#define VERSION "1.48.0"
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */

+ 215 - 2
contrib/libs/nghttp2/lib/includes/nghttp2/nghttp2.h

@@ -634,7 +634,11 @@ typedef enum {
    * The ORIGIN frame, which is defined by `RFC 8336
    * <https://tools.ietf.org/html/rfc8336>`_.
    */
-  NGHTTP2_ORIGIN = 0x0c
+  NGHTTP2_ORIGIN = 0x0c,
+  /**
+   * The PRIORITY_UPDATE frame, which is defined by :rfc:`9218`.
+   */
+  NGHTTP2_PRIORITY_UPDATE = 0x10
 } nghttp2_frame_type;
 
 /**
@@ -703,7 +707,11 @@ typedef enum {
    * SETTINGS_ENABLE_CONNECT_PROTOCOL
    * (`RFC 8441 <https://tools.ietf.org/html/rfc8441>`_)
    */
-  NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL = 0x08
+  NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL = 0x08,
+  /**
+   * SETTINGS_NO_RFC7540_PRIORITIES (:rfc:`9218`)
+   */
+  NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES = 0x09
 } nghttp2_settings_id;
 /* Note: If we add SETTINGS, update the capacity of
    NGHTTP2_INBOUND_NUM_IV as well */
@@ -2693,6 +2701,11 @@ nghttp2_option_set_max_deflate_dynamic_table_size(nghttp2_option *option,
  * This option prevents the library from retaining closed streams to
  * maintain the priority tree.  If this option is set to nonzero,
  * applications can discard closed stream completely to save memory.
+ *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 1 is submitted via `nghttp2_submit_settings()`, any
+ * closed streams are not retained regardless of this option.
  */
 NGHTTP2_EXTERN void nghttp2_option_set_no_closed_streams(nghttp2_option *option,
                                                          int val);
@@ -2719,6 +2732,24 @@ NGHTTP2_EXTERN void nghttp2_option_set_max_outbound_ack(nghttp2_option *option,
 NGHTTP2_EXTERN void nghttp2_option_set_max_settings(nghttp2_option *option,
                                                     size_t val);
 
+/**
+ * @function
+ *
+ * This option, if set to nonzero, allows server to fallback to
+ * :rfc:`7540` priorities if SETTINGS_NO_RFC7540_PRIORITIES was not
+ * received from client, and server submitted
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * = 1 via `nghttp2_submit_settings()`.  Most of the advanced
+ * functionality for RFC 7540 priorities are still disabled.  This
+ * fallback only enables the minimal feature set of RFC 7540
+ * priorities to deal with priority signaling from client.
+ *
+ * Client session ignores this option.
+ */
+NGHTTP2_EXTERN void
+nghttp2_option_set_server_fallback_rfc7540_priorities(nghttp2_option *option,
+                                                      int val);
+
 /**
  * @function
  *
@@ -3589,6 +3620,11 @@ NGHTTP2_EXTERN int nghttp2_session_consume_stream(nghttp2_session *session,
  * found, we use default priority instead of given |pri_spec|.  That
  * is make stream depend on root stream with weight 16.
  *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 1 is submitted via `nghttp2_submit_settings()`, this
+ * function does nothing and returns 0.
+ *
  * This function returns 0 if it succeeds, or one of the following
  * negative error codes:
  *
@@ -3632,6 +3668,11 @@ nghttp2_session_change_stream_priority(nghttp2_session *session,
  * found, we use default priority instead of given |pri_spec|.  That
  * is make stream depend on root stream with weight 16.
  *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 1 is submitted via `nghttp2_submit_settings()`, this
+ * function does nothing and returns 0.
+ *
  * This function returns 0 if it succeeds, or one of the following
  * negative error codes:
  *
@@ -3837,6 +3878,11 @@ nghttp2_priority_spec_check_default(const nghttp2_priority_spec *pri_spec);
  * :macro:`NGHTTP2_MAX_WEIGHT`, it becomes
  * :macro:`NGHTTP2_MAX_WEIGHT`.
  *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 1 is received by a remote endpoint, |pri_spec| is
+ * ignored, and treated as if ``NULL`` is specified.
+ *
  * The |nva| is an array of name/value pair :type:`nghttp2_nv` with
  * |nvlen| elements.  The application is responsible to include
  * required pseudo-header fields (header field whose name starts with
@@ -4057,6 +4103,11 @@ NGHTTP2_EXTERN int nghttp2_submit_trailer(nghttp2_session *session,
  * :macro:`NGHTTP2_MIN_WEIGHT`.  If it is strictly greater than
  * :macro:`NGHTTP2_MAX_WEIGHT`, it becomes :macro:`NGHTTP2_MAX_WEIGHT`.
  *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 1 is received by a remote endpoint, |pri_spec| is
+ * ignored, and treated as if ``NULL`` is specified.
+ *
  * The |nva| is an array of name/value pair :type:`nghttp2_nv` with
  * |nvlen| elements.  The application is responsible to include
  * required pseudo-header fields (header field whose name starts with
@@ -4184,6 +4235,11 @@ NGHTTP2_EXTERN int nghttp2_submit_data(nghttp2_session *session, uint8_t flags,
  * :macro:`NGHTTP2_MAX_WEIGHT`, it becomes
  * :macro:`NGHTTP2_MAX_WEIGHT`.
  *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 1 is received by a remote endpoint, this function does
+ * nothing and returns 0.
+ *
  * This function returns 0 if it succeeds, or one of the following
  * negative error codes:
  *
@@ -4198,6 +4254,61 @@ nghttp2_submit_priority(nghttp2_session *session, uint8_t flags,
                         int32_t stream_id,
                         const nghttp2_priority_spec *pri_spec);
 
+/**
+ * @macro
+ *
+ * :macro:`NGHTTP2_EXTPRI_DEFAULT_URGENCY` is the default urgency
+ * level for :rfc:`9218` extensible priorities.
+ */
+#define NGHTTP2_EXTPRI_DEFAULT_URGENCY 3
+
+/**
+ * @macro
+ *
+ * :macro:`NGHTTP2_EXTPRI_URGENCY_HIGH` is the highest urgency level
+ * for :rfc:`9218` extensible priorities.
+ */
+#define NGHTTP2_EXTPRI_URGENCY_HIGH 0
+
+/**
+ * @macro
+ *
+ * :macro:`NGHTTP2_EXTPRI_URGENCY_LOW` is the lowest urgency level for
+ * :rfc:`9218` extensible priorities.
+ */
+#define NGHTTP2_EXTPRI_URGENCY_LOW 7
+
+/**
+ * @macro
+ *
+ * :macro:`NGHTTP2_EXTPRI_URGENCY_LEVELS` is the number of urgency
+ * levels for :rfc:`9218` extensible priorities.
+ */
+#define NGHTTP2_EXTPRI_URGENCY_LEVELS (NGHTTP2_EXTPRI_URGENCY_LOW + 1)
+
+/**
+ * @struct
+ *
+ * :type:`nghttp2_extpri` is :rfc:`9218` extensible priorities
+ * specification for a stream.
+ */
+typedef struct nghttp2_extpri {
+  /**
+   * :member:`urgency` is the urgency of a stream, it must be in
+   * [:macro:`NGHTTP2_EXTPRI_URGENCY_HIGH`,
+   * :macro:`NGHTTP2_EXTPRI_URGENCY_LOW`], inclusive, and 0 is the
+   * highest urgency.
+   */
+  uint32_t urgency;
+  /**
+   * :member:`inc` indicates that a content can be processed
+   * incrementally or not.  If inc is 0, it cannot be processed
+   * incrementally.  If inc is 1, it can be processed incrementally.
+   * Other value is not permitted.
+   */
+  int inc;
+} nghttp2_extpri;
+
 /**
  * @function
  *
@@ -4722,6 +4833,108 @@ NGHTTP2_EXTERN int nghttp2_submit_origin(nghttp2_session *session,
                                          const nghttp2_origin_entry *ov,
                                          size_t nov);
 
+/**
+ * @struct
+ *
+ * The payload of PRIORITY_UPDATE frame.  PRIORITY_UPDATE frame is a
+ * non-critical extension to HTTP/2.  If this frame is received, and
+ * `nghttp2_option_set_user_recv_extension_type()` is not set, and
+ * `nghttp2_option_set_builtin_recv_extension_type()` is set for
+ * :enum:`nghttp2_frame_type.NGHTTP2_PRIORITY_UPDATE`,
+ * ``nghttp2_extension.payload`` will point to this struct.
+ *
+ * It has the following members:
+ */
+typedef struct {
+  /**
+   * The stream ID of the stream whose priority is updated.
+   */
+  int32_t stream_id;
+  /**
+   * The pointer to Priority field value.  It is not necessarily
+   * NULL-terminated.
+   */
+  uint8_t *field_value;
+  /**
+   * The length of the :member:`field_value`.
+   */
+  size_t field_value_len;
+} nghttp2_ext_priority_update;
+
+/**
+ * @function
+ *
+ * Submits PRIORITY_UPDATE frame.
+ *
+ * PRIORITY_UPDATE frame is a non-critical extension to HTTP/2, and
+ * defined in :rfc:`9218#section-7.1`.
+ *
+ * The |flags| is currently ignored and should be
+ * :enum:`nghttp2_flag.NGHTTP2_FLAG_NONE`.
+ *
+ * The |stream_id| is the ID of stream which is prioritized.  The
+ * |field_value| points to the Priority field value.  The
+ * |field_value_len| is the length of the Priority field value.
+ *
+ * If this function is called by server,
+ * :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE` is returned.
+ *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 0 is received by a remote endpoint (or it is omitted),
+ * this function does nothing and returns 0.
+ *
+ * This function returns 0 if it succeeds, or one of the following
+ * negative error codes:
+ *
+ * :enum:`nghttp2_error.NGHTTP2_ERR_NOMEM`
+ *     Out of memory
+ * :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE`
+ *     The function is called from server side session
+ * :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
+ *     The |field_value_len| is larger than 16380; or |stream_id| is
+ *     0.
+ */
+NGHTTP2_EXTERN int nghttp2_submit_priority_update(nghttp2_session *session,
+                                                  uint8_t flags,
+                                                  int32_t stream_id,
+                                                  const uint8_t *field_value,
+                                                  size_t field_value_len);
+
+/**
+ * @function
+ *
+ * Changes the priority of the existing stream denoted by |stream_id|.
+ * The new priority is |extpri|.  This function is meant to be used by
+ * server for :rfc:`9218` extensible prioritization scheme.
+ *
+ * If |session| is initialized as client, this function returns
+ * :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE`.  For client, use
+ * `nghttp2_submit_priority_update()` instead.
+ *
+ * If :member:`extpri->urgency <nghttp2_extpri.urgency>` is out of
+ * bound, it is set to :macro:`NGHTTP2_EXTPRI_URGENCY_LOW`.
+ *
+ * If |ignore_client_signal| is nonzero, server starts to ignore
+ * client priority signals for this stream.
+ *
+ * If
+ * :enum:`nghttp2_settings_id.NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES`
+ * of value of 1 is not submitted via `nghttp2_submit_settings()`,
+ * this function does nothing and returns 0.
+ *
+ * :enum:`nghttp2_error.NGHTTP2_ERR_NOMEM`
+ *     Out of memory.
+ * :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_STATE`
+ *     The |session| is initialized as client.
+ * :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
+ *     |stream_id| is zero; or a stream denoted by |stream_id| is not
+ *     found.
+ */
+NGHTTP2_EXTERN int nghttp2_session_change_extpri_stream_priority(
+    nghttp2_session *session, int32_t stream_id, const nghttp2_extpri *extpri,
+    int ignore_client_signal);
+
 /**
  * @function
  *

+ 2 - 2
contrib/libs/nghttp2/lib/includes/nghttp2/nghttp2ver.h

@@ -29,7 +29,7 @@
  * @macro
  * Version number of the nghttp2 library release
  */
-#define NGHTTP2_VERSION "1.47.0"
+#define NGHTTP2_VERSION "1.48.0"
 
 /**
  * @macro
@@ -37,6 +37,6 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define NGHTTP2_VERSION_NUM 0x012f00
+#define NGHTTP2_VERSION_NUM 0x013000
 
 #endif /* NGHTTP2VER_H */

+ 35 - 0
contrib/libs/nghttp2/lib/nghttp2_extpri.c

@@ -0,0 +1,35 @@
+/*
+ * nghttp2 - HTTP/2 C Library
+ *
+ * Copyright (c) 2022 nghttp3 contributors
+ * Copyright (c) 2022 nghttp2 contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include "nghttp2_extpri.h"
+
+uint8_t nghttp2_extpri_to_uint8(const nghttp2_extpri *extpri) {
+  return (uint8_t)((uint32_t)extpri->inc << 7 | extpri->urgency);
+}
+
+void nghttp2_extpri_from_uint8(nghttp2_extpri *extpri, uint8_t u8extpri) {
+  extpri->urgency = nghttp2_extpri_uint8_urgency(u8extpri);
+  extpri->inc = nghttp2_extpri_uint8_inc(u8extpri);
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов