Projects
home:fstrba
nghttp3
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
nghttp3.spec
Changed
@@ -28,6 +28,8 @@ Source1: https://github.com/ngtcp2/nghttp3/releases/download/v%{version}/nghttp3-%{version}.tar.xz.asc Source2: nghttp3.keyring Source3: baselibs.conf +# https://github.com/lexiforest/curl-impersonate/raw/refs/tags/v2.1.1/patches/nghttp3.patch +Patch0: curl-impersonate.patch BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: python-rpm-macros
View file
curl-impersonate.patch
Added
@@ -0,0 +1,335 @@ +--- nghttp3-1.18.0.orig/lib/includes/nghttp3/nghttp3.h 2026-08-24 15:05:59.316118732 +0200 ++++ nghttp3-1.18.0/lib/includes/nghttp3/nghttp3.h 2026-08-24 15:06:12.559173850 +0200 +@@ -1801,6 +1801,53 @@ + #define NGHTTP3_SETTINGS_VERSION NGHTTP3_SETTINGS_V4 + + /** ++ * @macro ++ * ++ * :macro:`NGHTTP3_SETTINGS_ID_MAX_FIELD_SECTION_SIZE` is the HTTP/3 ++ * SETTINGS identifier for MAX_FIELD_SECTION_SIZE. ++ */ ++#define NGHTTP3_SETTINGS_ID_MAX_FIELD_SECTION_SIZE 0x06 ++/** ++ * @macro ++ * ++ * :macro:`NGHTTP3_SETTINGS_ID_QPACK_MAX_TABLE_CAPACITY` is the ++ * HTTP/3 SETTINGS identifier for QPACK_MAX_TABLE_CAPACITY. ++ */ ++#define NGHTTP3_SETTINGS_ID_QPACK_MAX_TABLE_CAPACITY 0x01 ++/** ++ * @macro ++ * ++ * :macro:`NGHTTP3_SETTINGS_ID_QPACK_BLOCKED_STREAMS` is the HTTP/3 ++ * SETTINGS identifier for QPACK_BLOCKED_STREAMS. ++ */ ++#define NGHTTP3_SETTINGS_ID_QPACK_BLOCKED_STREAMS 0x07 ++/** ++ * @macro ++ * ++ * :macro:`NGHTTP3_SETTINGS_ID_ENABLE_CONNECT_PROTOCOL` is the HTTP/3 ++ * SETTINGS identifier for ENABLE_CONNECT_PROTOCOL. ++ */ ++#define NGHTTP3_SETTINGS_ID_ENABLE_CONNECT_PROTOCOL 0x08 ++/** ++ * @macro ++ * ++ * :macro:`NGHTTP3_SETTINGS_ID_H3_DATAGRAM` is the HTTP/3 SETTINGS ++ * identifier for H3_DATAGRAM. ++ */ ++#define NGHTTP3_SETTINGS_ID_H3_DATAGRAM 0x33 ++ ++/** ++ * @struct ++ * ++ * :type:`nghttp3_settings_entry` is an HTTP/3 SETTINGS identifier and ++ * value pair. ++ */ ++typedef struct nghttp3_settings_entry { ++ uint64_t id; ++ uint64_t value; ++} nghttp3_settings_entry; ++ ++/** + * @struct + * + * :type:`nghttp3_settings` defines HTTP/3 settings. +@@ -2579,6 +2626,33 @@ + + /** + * @function ++ * ++ * `nghttp3_conn_submit_settings` submits SETTINGS entries to be sent ++ * on the control stream in the same order as |iv|. The entries are ++ * copied by this function, and |iv| does not have to be kept after ++ * this function returns. |iv| may be NULL if |niv| is 0. |flags| ++ * is currently ignored and should be 0. ++ * ++ * This function must be called before ++ * `nghttp3_conn_bind_control_stream`. ++ * ++ * This function returns 0 if it succeeds, or one of the following ++ * negative error codes: ++ * ++ * :macro:`NGHTTP3_ERR_INVALID_STATE` ++ * Control stream has already been bound. ++ * :macro:`NGHTTP3_ERR_INVALID_ARGUMENT` ++ * |iv| is NULL but |niv| is not 0. ++ * :macro:`NGHTTP3_ERR_NOMEM` ++ * Out of memory. ++ */ ++NGHTTP3_EXTERN int nghttp3_conn_submit_settings(nghttp3_conn *conn, ++ uint8_t flags, ++ const nghttp3_settings_entry *iv, ++ size_t niv); ++ ++/** ++ * @function + * + * .. warning:: + * +--- nghttp3-1.18.0.orig/lib/nghttp3_conn.c 2026-08-24 15:05:59.315038119 +0200 ++++ nghttp3-1.18.0/lib/nghttp3_conn.c 2026-08-24 15:06:12.559851438 +0200 +@@ -438,6 +438,7 @@ + nghttp3_objalloc_free(&conn->stream_objalloc); + nghttp3_objalloc_free(&conn->out_chunk_objalloc); + ++ nghttp3_mem_free(conn->mem, conn->local.settings_iv); + nghttp3_mem_free(conn->mem, conn->rx.originbuf); + + nghttp3_mem_free(conn->mem, conn); +@@ -2194,6 +2195,13 @@ + .type = NGHTTP3_FRAME_SETTINGS, + .local_settings = &conn->local.settings, + }; ++ if (conn->local.settings_submitted) { ++ fr->settings = (nghttp3_frame_settings){ ++ .type = NGHTTP3_FRAME_SETTINGS, ++ .niv = conn->local.settings_niv, ++ .iv = conn->local.settings_iv, ++ }; ++ } + + if (conn->local.settings.origin_list) { + assert(conn->server); +@@ -2211,6 +2219,41 @@ + + return 0; + } ++ ++int nghttp3_conn_submit_settings(nghttp3_conn *conn, uint8_t flags, ++ const nghttp3_settings_entry *iv, ++ size_t niv) { ++ nghttp3_settings_entry *niv_copy = NULL; ++ (void)flags; ++ ++ if (conn->tx.ctrl) { ++ return NGHTTP3_ERR_INVALID_STATE; ++ } ++ ++ if (niv && iv == NULL) { ++ return NGHTTP3_ERR_INVALID_ARGUMENT; ++ } ++ ++ if (niv > SIZE_MAX / sizeof(*niv_copy)) { ++ return NGHTTP3_ERR_NOMEM; ++ } ++ ++ if (niv) { ++ niv_copy = nghttp3_mem_malloc(conn->mem, sizeof(*niv_copy) * niv); ++ if (niv_copy == NULL) { ++ return NGHTTP3_ERR_NOMEM; ++ } ++ ++ memcpy(niv_copy, iv, sizeof(*niv_copy) * niv); ++ } ++ ++ nghttp3_mem_free(conn->mem, conn->local.settings_iv); ++ conn->local.settings_iv = niv_copy; ++ conn->local.settings_niv = niv; ++ conn->local.settings_submitted = 1; ++ ++ return 0; ++} + + int nghttp3_conn_bind_qpack_streams(nghttp3_conn *conn, int64_t qenc_stream_id, + int64_t qdec_stream_id) { +--- nghttp3-1.18.0.orig/lib/nghttp3_conn.h 2026-08-24 15:05:59.315118083 +0200 ++++ nghttp3-1.18.0/lib/nghttp3_conn.h 2026-08-24 15:06:12.560360625 +0200 +@@ -100,6 +100,11 @@ + object is initialized as server. settings.origin_list may + point to the address of this field. */ + nghttp3_vec origin_list; ++ /* settings_iv points to a copied settings array passed to ++ nghttp3_conn_submit_settings(). */ ++ nghttp3_settings_entry *settings_iv; ++ size_t settings_niv; ++ uint8_t settings_submitted; + nghttp3_settings settings; + struct { + /* max_pushes is the number of push IDs that local endpoint can +--- nghttp3-1.18.0.orig/lib/nghttp3_frame.h 2026-08-24 15:05:59.313909955 +0200 ++++ nghttp3-1.18.0/lib/nghttp3_frame.h 2026-08-24 15:07:35.315667873 +0200 +@@ -71,22 +71,11 @@ + size_t nvlen; + } nghttp3_frame_headers; + +-#define NGHTTP3_SETTINGS_ID_MAX_FIELD_SECTION_SIZE 0x06U +-#define NGHTTP3_SETTINGS_ID_QPACK_MAX_TABLE_CAPACITY 0x01U +-#define NGHTTP3_SETTINGS_ID_QPACK_BLOCKED_STREAMS 0x07U +-#define NGHTTP3_SETTINGS_ID_ENABLE_CONNECT_PROTOCOL 0x08U +-#define NGHTTP3_SETTINGS_ID_H3_DATAGRAM 0x33U +- + #define NGHTTP3_H2_SETTINGS_ID_ENABLE_PUSH 0x2U + #define NGHTTP3_H2_SETTINGS_ID_MAX_CONCURRENT_STREAMS 0x3U + #define NGHTTP3_H2_SETTINGS_ID_INITIAL_WINDOW_SIZE 0x4U + #define NGHTTP3_H2_SETTINGS_ID_MAX_FRAME_SIZE 0x5U + +-typedef struct nghttp3_settings_entry { +- uint64_t id; +- uint64_t value; +-} nghttp3_settings_entry; +- + typedef struct nghttp3_frame_settings { + uint64_t type; + size_t niv; +--- nghttp3-1.18.0.orig/lib/nghttp3_stream.c 2026-08-24 15:05:59.316597277 +0200 ++++ nghttp3-1.18.0/lib/nghttp3_stream.c 2026-08-24 15:13:24.606587507 +0200 +@@ -333,13 +333,16 @@ + nghttp3_buf *chunk;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.