Giter Site home page Giter Site logo

ngtcp2 / nghttp3 Goto Github PK

View Code? Open in Web Editor NEW
843.0 843.0 91.0 1.37 MB

HTTP/3 library written in C

Home Page: https://nghttp2.org/nghttp3/

License: MIT License

Makefile 0.77% M4 3.49% Python 3.04% C 89.14% Shell 0.22% CMake 2.61% Dockerfile 0.02% C++ 0.72%
http3 qpack quic rfc9114 rfc9204 rfc9218 rfc9220 rfc9297

nghttp3's Introduction

ngtcp2

"Call it TCP/2. One More Time."

ngtcp2 project is an effort to implement RFC9000 QUIC protocol.

Documentation

Online documentation is available.

Public test server

The following endpoints are available to try out ngtcp2 implementation:

Requirements

The libngtcp2 C library itself does not depend on any external libraries. The example client, and server are written in C++20, and should compile with the modern C++ compilers (e.g., clang >= 11.0, or gcc >= 11.0).

The following packages are required to configure the build system:

  • pkg-config >= 0.20
  • autoconf
  • automake
  • autotools-dev
  • libtool

To build sources under the examples directory, libev and nghttp3 are required:

To enable TLS Certificate Compression in bsslclient and bsslserver (BoringSSL (aws-lc) examples client and server), the following library is required:

  • libbrotli-dev >= 1.0.9

ngtcp2 crypto helper library, and client and server under examples directory require at least one of the following TLS backends:

  • quictls
  • GnuTLS >= 3.7.5
  • BoringSSL (commit a220a6024f66c123019b5c080f6bd8bcaf75448c); or aws-lc >= 1.19.0
  • Picotls (commit e4f0a27ebd1c07ebed68674258da9556fb92b46b)
  • wolfSSL >= 5.5.0

Before building from git

When build from git, run the following command to pull submodules:

$ git submodule update --init

Build with wolfSSL

$ git clone --depth 1 -b v5.7.0-stable https://github.com/wolfSSL/wolfssl
$ cd wolfssl
$ autoreconf -i
$ # For wolfSSL < v5.6.6, append --enable-quic.
$ ./configure --prefix=$PWD/build \
    --enable-all --enable-aesni --enable-harden --enable-keylog-export \
    --disable-ech
$ make -j$(nproc)
$ make install
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/nghttp3
$ cd nghttp3
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only
$ make -j$(nproc) check
$ make install
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/ngtcp2
$ cd ngtcp2
$ autoreconf -i
$ # For Mac users who have installed libev with MacPorts, append
$ # LIBEV_CFLAGS="-I/opt/local/include" LIBEV_LIBS="-L/opt/local/lib -lev"
$ ./configure PKG_CONFIG_PATH=$PWD/../wolfssl/build/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig \
    --with-wolfssl
$ make -j$(nproc) check

Build with BoringSSL

$ git clone https://boringssl.googlesource.com/boringssl
$ cd boringssl
$ git checkout a220a6024f66c123019b5c080f6bd8bcaf75448c
$ cmake -B build -DCMAKE_POSITION_INDEPENDENT_CODE=ON
$ make -j$(nproc) -C build
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/nghttp3
$ cd nghttp3
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only
$ make -j$(nproc) check
$ make install
$ cd ..
$ git clone --recursive  https://github.com/ngtcp2/ngtcp2
$ cd ngtcp2
$ autoreconf -i
$ # For Mac users who have installed libev with MacPorts, append
$ # LIBEV_CFLAGS="-I/opt/local/include" LIBEV_LIBS="-L/opt/local/lib -lev"
$ ./configure PKG_CONFIG_PATH=$PWD/../nghttp3/build/lib/pkgconfig \
    BORINGSSL_LIBS="-L$PWD/../boringssl/build/ssl -lssl -L$PWD/../boringssl/build/crypto -lcrypto" \
    BORINGSSL_CFLAGS="-I$PWD/../boringssl/include" \
    --with-boringssl
$ make -j$(nproc) check

Build with aws-lc

$ git clone --depth 1 -b v1.29.0 https://github.com/aws/aws-lc
$ cd aws-lc
$ cmake -B build -DDISABLE_GO=ON
$ make -j$(nproc) -C build
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/nghttp3
$ cd nghttp3
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only
$ make -j$(nproc) check
$ make install
$ cd ..
$ git clone --recursive  https://github.com/ngtcp2/ngtcp2
$ cd ngtcp2
$ autoreconf -i
$ # For Mac users who have installed libev with MacPorts, append
$ # LIBEV_CFLAGS="-I/opt/local/include" LIBEV_LIBS="-L/opt/local/lib -lev"
$ ./configure PKG_CONFIG_PATH=$PWD/../nghttp3/build/lib/pkgconfig \
    BORINGSSL_CFLAGS="-I$PWD/../aws-lc/include" \
    BORINGSSL_LIBS="-L$PWD/../aws-lc/build/ssl -lssl -L$PWD/../aws-lc/build/crypto -lcrypto" \
    --with-boringssl
$ make -j$(nproc) check

Build with libressl

$ git clone --depth 1 -b v3.9.2 https://github.com/libressl/portable.git libressl
$ cd libressl
$ ./autogen.sh
$ ./configure --prefix=$PWD/build
$ make -j$(nproc) install
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/nghttp3
$ cd nghttp3
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only
$ make -j$(nproc) check
$ make install
$ cd ..
$ git clone --recursive  https://github.com/ngtcp2/ngtcp2
$ cd ngtcp2
$ autoreconf -i
$ # For Mac users who have installed libev with MacPorts, append
$ # LIBEV_CFLAGS="-I/opt/homebrew/Cellar/libev/4.33/include" LIBEV_LIBS="-L/opt/homebrew/Cellar/libev/4.33/lib -lev"
$ ./configure PKG_CONFIG_PATH=$PWD/../nghttp3/build/lib/pkgconfig:$PWD/../libressl/build/lib/pkgconfig
$ make -j$(nproc) check

Client/Server

After successful build, the client and server executable should be found under examples directory. They talk HTTP/3.

Client

$ examples/wsslclient [OPTIONS] <HOST> <PORT> [<URI>...]

The notable options are:

  • -d, --data=<PATH>: Read data from <PATH> and send it to a peer.

Server

$ examples/wsslserver [OPTIONS] <ADDR> <PORT> <PRIVATE_KEY_FILE> <CERTIFICATE_FILE>

The notable options are:

  • -V, --validate-addr: Enforce stateless address validation.

H09wsslclient/H09wsslserver

There are h09wsslclient and h09wsslserver which speak HTTP/0.9. They are written just for quic-interop-runner. They share the basic functionalities with HTTP/3 client and server but have less functions (e.g., h09wsslclient does not have a capability to send request body, and h09wsslserver does not understand numeric request path, like /1000).

Resumption and 0-RTT

In order to resume a session, a session ticket, and a transport parameters must be fetched from server. First, run examples/wsslclient with --session-file, and --tp-file options which specify a path to session ticket, and transport parameter files respectively to save them locally.

Once these files are available, run examples/wsslclient with the same arguments again. You will see that session is resumed in your log if resumption succeeds. Resuming session makes server's first Handshake packet pretty small because it does not send its certificates.

To send 0-RTT data, after making sure that resumption works, use -d option to specify a file which contains data to send.

Token (Not something included in Retry packet)

QUIC server might send a token to client after connection has been established. Client can send this token in subsequent connection to the server. Server verifies the token and if it succeeds, the address validation completes and lifts some restrictions on server which might speed up transfer. In order to save and/or load a token, use --token-file option of examples/wsslclient. The given file is overwritten if it already exists when storing a token.

Crypto helper library

In order to make TLS stack integration less painful, we provide a crypto helper library which offers the basic crypto operations.

The header file exists under crypto/includes/ngtcp2 directory.

Each library file is built for a particular TLS backend. The available crypto helper libraries are:

  • libngtcp2_crypto_quictls: Use quictls and libressl as TLS backend
  • libngtcp2_crypto_gnutls: Use GnuTLS as TLS backend
  • libngtcp2_crypto_boringssl: Use BoringSSL and aws-lc as TLS backend
  • libngtcp2_crypto_picotls: Use Picotls as TLS backend
  • libngtcp2_crypto_wolfssl: Use wolfSSL as TLS backend

Because BoringSSL and Picotls are an unversioned product, we only tested their particular revision. See Requirements section above.

We use Picotls with OpenSSL as crypto backend.

The examples directory contains client and server that are linked to those crypto helper libraries and TLS backends. They are only built if their corresponding crypto helper library is built:

  • qtlsclient: quictls(libressl) client
  • qtlsserver: quictls(libressl) server
  • gtlsclient: GnuTLS client
  • gtlsserver: GnuTLS server
  • bsslclient: BoringSSL(aws-lc) client
  • bsslserver: BoringSSL(aws-lc) server
  • ptlsclient: Picotls client
  • ptlsserver: Picotls server
  • wsslclient: wolfSSL client
  • wsslserver: wolfSSL server

QUIC protocol extensions

The library implements the following QUIC protocol extensions:

Configuring Wireshark for QUIC

Wireshark can be configured to analyze QUIC traffic using the following steps:

  1. Set SSLKEYLOGFILE environment variable:

    $ export SSLKEYLOGFILE=quic_keylog_file
  2. Set the port that QUIC uses

    Go to Preferences->Protocols->QUIC and set the port the program listens to. In the case of the example application this would be the port specified on the command line.

  3. Set Pre-Master-Secret logfile

    Go to Preferences->Protocols->TLS and set the Pre-Master-Secret log file to the same value that was specified for SSLKEYLOGFILE.

  4. Choose the correct network interface for capturing

    Make sure you choose the correct network interface for capturing. For example, if using localhost choose the loopback network interface on macos.

  5. Create a filter

    Create A filter for the udp.port and set the port to the port the application is listening to. For example:

    udp.port == 7777
    

License

The MIT License

Copyright (c) 2016 ngtcp2 contributors

nghttp3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nghttp3's Issues

Failed assertion in nghttp3_conn

Working on push stream support. When srclen is 0 and fin is 1, the following assertion fails.

Assertion failed: srclen, file c:\users\jasne\projects\quic\deps\nghttp3\lib\nghttp3_conn.c, line 573

It seems that possibly nghttp3_conn_read_uni is not handling fin correctly or am I missing something?

`-Wformat=` GCC 12 compiler warnings (Windows)

/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_map.c: In function 'nghttp3_map_print_distance':
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_map.c:144:21: warning: unknown conversion type character 'z' in format [-Wformat=]
  144 |     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
      |                     ^~~~~~~~~~~~~~~~~~~~~
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_map.c:144:58: note: format string is defined here
  144 |     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
      |                                                          ^
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_map.c:144:21: warning: unknown conversion type character 'z' in format [-Wformat=]
  144 |     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
      |                     ^~~~~~~~~~~~~~~~~~~~~
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_map.c:144:71: note: format string is defined here
  144 |     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
      |                                                                       ^
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_map.c:144:21: warning: too many arguments for format [-Wformat-extra-args]
  144 |     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
      |                     ^~~~~~~~~~~~~~~~~~~~~

/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_ksl.c: In function 'ksl_print':
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_ksl.c:731:24: warning: unknown conversion type character 'z' in format [-Wformat=]
  731 |   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
      |                        ^
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_ksl.c:731:30: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long
  731 |   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
      |                             ~^     ~~~~~
      |                              |     |
      |                              |     size_t {aka long long unsigned int}
      |                              unsigned int
      |                             %llu
/home/runner/work/curl-for-win/curl-for-win/nghttp3/lib/nghttp3_ksl.c:731:19: warning: too many arguments for format [-Wformat-extra-args]
  731 |   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
      |                   ^~~~~~~~~~~~~~~

Ref: https://github.com/curl/curl-for-win/actions/runs/6711735060/job/18239769146#step:3:3828

nghttp3_conn_shutdown() behavior

Hello, the description for nghttp3_conn_shutdown says

 * `nghttp3_conn_shutdown` starts graceful shutdown.  It should be
 * called after `nghttp3_conn_submit_shutdown_notice` and a couple of
 * RTT. 

but the unit tests don't call nghttp3_conn_submit_shutdown_notice. What should be the correct behavior here?

nghttp3_rcbuf.h:30:12: fatal error: config.h: No such file or directory

Hello!

I'm trying to build nghttp3 to build curl follow documentation https://curl.se/docs/http3.html.

 % cd ..
 % git clone -b v0.15.0 https://github.com/ngtcp2/nghttp3
 % cd nghttp3
 % autoreconf -fi
 % ./configure --prefix=<somewhere2> --enable-lib-only
 % make
 % make install

I get the follwing error after run make:

# ~/p/g/nghttp3 git:(tag:v0.15.0) make
make[1]: Entering directory '/home/pk/projects/github/nghttp3'
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make[1]: Leaving directory '/home/pk/projects/github/nghttp3'
make  all-recursive
make[1]: Entering directory '/home/pk/projects/github/nghttp3'
Making all in lib
make[2]: Entering directory '/home/pk/projects/github/nghttp3/lib'
Making all in includes
make[3]: Entering directory '/home/pk/projects/github/nghttp3/lib/includes'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/pk/projects/github/nghttp3/lib/includes'
make[3]: Entering directory '/home/pk/projects/github/nghttp3/lib'
  CC       nghttp3_rcbuf.lo
In file included from nghttp3_rcbuf.c:26:
nghttp3_rcbuf.h:30:12: fatal error: config.h: No such file or directory
   30 | #  include <config.h>
      |            ^~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:649: nghttp3_rcbuf.lo] Error 1
make[3]: Leaving directory '/home/pk/projects/github/nghttp3/lib'
make[2]: *** [Makefile:690: all-recursive] Error 1
make[2]: Leaving directory '/home/pk/projects/github/nghttp3/lib'
make[1]: *** [Makefile:510: all-recursive] Error 1
make[1]: Leaving directory '/home/pk/projects/github/nghttp3'
make: *** [Makefile:417: all] Error 2

My system is Ubuntu 20.04.6 LTS.

# ~/p/g/nghttp3 git:(tag:v0.15.0) lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
# ~/p/g/nghttp3 git:(tag:v0.15.0) uname -r
5.13.0-52-generic

Could you please advise what I'm doing wrong?
Thanks!

Error building nghttp3 in centos

@tatsuhiro-t
When trying to execute this below line , I encountered an error. Im using centos 7 with gcc version 4.8.5.
./configure --prefix=/path/to/output --enable-lib-only

checking whether _XOPEN_SOURCE should be defined... no
checking build system type... config.sub: too many arguments
Try `config.sub --help' for more information.
configure: error: /bin/sh ././config.sub x86_64-pc-linux-gnu
rm: cannot remove '/tmp/cgNlKQ49': Is a Directory failed```

qpack value length prefix error after reading a literal name

In the case of Encoder Instruction Insert Without Name Reference (https://tools.ietf.org/html/draft-ietf-quic-qpack-16#section-4.3.3), use s2load to perform a QUIC request, and if the returned Encoder Instructions from server contain a "Insert Without Name Reference", the code might return ERR_QPACK_ENCODER_STREAM_ERROR problems if value length is >= 31 bytes.
This would print:
nghttp3_conn_read_stream: ERR_QPACK_ENCODER_STREAM_ERROR

In this instruction, the prefix of Name Length is 5. after reading the Name Length and Name String, it comes the Value Length field, with a prefix of 7.
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| 0 | 1 | H | Name Length (5+) |
+---+---+---+-------------------+
| Name String (Length bytes) |
+---+---------------------------+
| H | Value Length (7+) |
+---+---------------------------+
| Value String (Length bytes) |
+-------------------------------+

More specifically, in the function nghttp3_qpack_decoder_read_encoder, the prefix is restored in the decoder->rstate.prefix. when reading Name Length, this variable is set to 5, and after the NGHTTP3_QPACK_ES_STATE_READ_NAME code section (nghttp3_qpack.c, line 2946), it remains to be 5, but should be set to 7. And if the Value Length is between [31, 127) , that is [2^5-1, 2^7-1), the reading of vaint will be error, and get an error Value Length, and cause the huffman check of Value to be error.

I try to change the prefix to 7 at the end of NGHTTP3_QPACK_ES_STATE_READ_NAME case, turned out to be work well

configure: line 17674: syntax error near unexpected token `0.20'

I triggered this error in Ubuntu 22.04.2 and Debian 12.

I removed all of the configure options and got the same error.

My command line is

autoreconf -fi
mkdir build
cd build || exit 1
../configure --prefix=/home/jman/tmp/dltools-build-script/workspace --disable-shared --disable-werror --enable-lib-only
make -j32
make install

The output in terminal shows

building nghttp3 - version 0.12.0
====================================
The file "nghttp3-0.12.0.tar.gz" is already downloaded.
Extracted the archive: nghttp3-0.12.0.tar.gz

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:30: installing './compile'
configure.ac:33: installing './config.guess'
configure.ac:33: installing './config.sub'
configure.ac:39: installing './install-sh'
configure.ac:39: installing './missing'
Makefile.am: installing './INSTALL'
examples/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
$ ../configure --prefix=/home/jman/tmp/dltools-build-script/workspace --disable-shared --disable-werror --enable-lib-only
../configure: line 17170: syntax error near unexpected token `0.20'
../configure: line 17170: `PKG_PROG_PKG_CONFIG(0.20)'

nghttp3 v1 release plan

Prerequisites

There is no outstanding issues that blocks nghttp3 v1.

Changes required on v1 release

TBD

Release schedule

  • v0.12: regular release as usual
  • v0.13: this release should be considered as Release Candidate (RC) 1.

unable to build nghttp3,please help with require libs

suneetha@ELW3093:/HTTP3$ git clone https://github.com/ngtcp2/nghttp3
Cloning into 'nghttp3'...
remote: Enumerating objects: 164, done.
remote: Counting objects: 100% (164/164), done.
remote: Compressing objects: 100% (103/103), done.
remote: Total 2139 (delta 100), reused 113 (delta 61), pack-reused 1975
Receiving objects: 100% (2139/2139), 755.51 KiB | 273.00 KiB/s, done.
Resolving deltas: 100% (1579/1579), done.
suneetha@ELW3093:
/HTTP3$ cd nghttp3
suneetha@ELW3093:/HTTP3/nghttp3$ autoreconf -i
configure.ac:30: installing './compile'
configure.ac:35: installing './config.guess'
configure.ac:35: installing './config.sub'
configure.ac:39: installing './install-sh'
configure.ac:39: installing './missing'
Makefile.am: installing './INSTALL'
examples/Makefile.am: installing './depcomp'
lib/Makefile.am:33: error: Libtool library used but 'LIBTOOL' is undefined
lib/Makefile.am:33: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
lib/Makefile.am:33: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
lib/Makefile.am:33: If 'LT_INIT' is in 'configure.ac', make sure
lib/Makefile.am:33: its definition is in aclocal's search path.
parallel-tests: installing './test-driver'
autoreconf: automake failed with exit status: 1
suneetha@ELW3093:
/HTTP3/nghttp3$ sudo apt-get install libtool
[sudo] password for suneetha:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libcurl4
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libltdl-dev
Suggested packages:
libtool-doc gfortran | fortran95-compiler gcj-jdk
The following NEW packages will be installed:
libltdl-dev libtool
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 323 kB of archives.
After this operation, 2173 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libltdl-dev amd64 2.4.6-14 [162 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libtool all 2.4.6-14 [161 kB]
Fetched 323 kB in 3s (125 kB/s)
Selecting previously unselected package libltdl-dev:amd64.
(Reading database ... 37899 files and directories currently installed.)
Preparing to unpack .../libltdl-dev_2.4.6-14_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-14) ...
Selecting previously unselected package libtool.
Preparing to unpack .../libtool_2.4.6-14_all.deb ...
Unpacking libtool (2.4.6-14) ...
Setting up libtool (2.4.6-14) ...
Setting up libltdl-dev:amd64 (2.4.6-14) ...
Processing triggers for man-db (2.9.1-1) ...
suneetha@ELW3093:/HTTP3/nghttp3$ sudo apt-get install libtool
Reading package lists... Done
Building dependency tree
Reading state information... Done
libtool is already the newest version (2.4.6-14).
The following package was automatically installed and is no longer required:
libcurl4
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
suneetha@ELW3093:
/HTTP3/nghttp3$ autoreconf -i
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/ltobsolete.m4'
suneetha@ELW3093:
/HTTP3/nghttp3$ ./configure --prefix=/home/suneetha/HTTP3/build2 --enable-lib-only
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define EXTENSIONS... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
./configure: line 12615: syntax error near unexpected token 0.20' ./configure: line 12615: PKG_PROG_PKG_CONFIG(0.20)'
suneetha@ELW3093:~/HTTP3/nghttp3$ make
make: *** No targets specified and no makefile found. Stop.

nghttp3_priority missing?

While building in ngtcp2/draft-20 I have the following:
+++
Making check in examples
make[1]: Entering directory '/home/jfclere/H2/ngtcp2/examples'
CXX client.o
client.cc: In member function โ€˜int Client::submit_http_request(int64_t)โ€™:
client.cc:2161:3: error: โ€˜nghttp3_priorityโ€™ was not declared in this scope; did you mean โ€˜nghttp3_errorโ€™?
2161 | nghttp3_priority pri, *ppri = NULL;
| ^~~~~~~~~~~~~~~~
| nghttp3_error
client.cc:2163:28: error: โ€˜priโ€™ was not declared in this scope
+++
Could be an include/source file in nghttp3 missing?

Building with `-DENABLE_SHARED_LIB=OFF` fails.

[ 97%] Linking C static library libnghttp3.a
[ 97%] Built target nghttp3_static
1 warning generated.
2 warnings generated.
[100%] Linking CXX executable qpack
ld: library not found for -lnghttp3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/qpack] Error 1
make[1]: *** [examples/CMakeFiles/qpack.dir/all] Error 2
make: *** [all] Error 2

Maybe I should disable building qpack binary?

Runtime selectable QPACK static tables

Hello Tatsuhiro,

I would like to reuse the nghttp3 QPACK encoder/decoder with another transport protocol that is similar to H3 but uses a different static table. I've had a look, and while the mkstatichdtbl.py utility exists, I think the only use for that would be to replace the existing QPACK static table code and compile it in.

Would there be any interest in adding support for a selectable or fully custom static table when initialising the QPACK encoder or decoder? Maybe with an extended version of nghttp3_qpack_encoder_new which takes the application-supplied static table as an argument.

Start providing releases

This library is already used in Node.js, so can you please start providing versioned releases?

acked_data() callback for requests without body?

hi, we want to record the time when request last byte is acked. Current implementation seems to only call acked_data() callback when data type is alien, i.e. when request has a body. Is there a way to know when header (data type: private) is acked for e.g. GET requests to consistently mark the end of request? Or can we add another callback? Thanks.

Enforcing const-qualified for fields in `nghttp3_nv` seems to cause inconvenience

We found a bit inconvenient to use the nghttp3_conn_submit_request API after #130 is merged.

The inconvenience is due to the fact that we now had to do additional casting in our code like below (unless the pointers are also saved in another variable or freed automatically):

Before #130:

free(headers[i].name);
free(headers[i].value);

After #130:

free((uint8_t*)headers[i].name);
free((uint8_t*)headers[i].value);

Can we consider only retaining the const qualifier for nghttp3_nv as a parameter of nghttp3_conn_submit_request API, but not retaining the const qualifiers for the name and value fields of the nghttp3_nv struct please? Thanks.

CC: @amirlivneh

Push stream not closing on client side

It's not clear if this is something I'm doing wrong or if there's a bug in nghttp3, but it does not appear that Push streams are closing properly after receiving fin.

The following is abbreviated debug output from the node.js implementation

...
QuicSession Client (h3-25, 14) Receiving QUIC packet.
QuicSession Client (h3-25, 14) Processing received packet
QuicSession Client (h3-25, 14) Received acknowledgement for 0 bytes of stream 0 data
QuicSession Client (h3-25, 14) Receiving 0 bytes for stream 15 (fin)
QuicSession Client (h3-25, 14) Extending session offset by 0 bytes
...
QuicStream 0 (19, QuicSession Client (h3-25, 14)) Beginning Headers
QuicSession Client (h3-25, 14) Receiving header for stream 0
QuicStream 0 (19, QuicSession Client (h3-25, 14)) Header - :path = /foo
QuicSession Client (h3-25, 14) Receiving header for stream 0
QuicStream 0 (19, QuicSession Client (h3-25, 14)) Header - :authority = localhost
QuicSession Client (h3-25, 14) Receiving header for stream 0
QuicStream 0 (19, QuicSession Client (h3-25, 14)) Header - :scheme = https
QuicSession Client (h3-25, 14) Receiving header for stream 0
QuicStream 0 (19, QuicSession Client (h3-25, 14)) Header - :method = GET
QuicSession Client (h3-25, 14) Ending header block for stream 0
QuicStream 0 (19, QuicSession Client (h3-25, 14)) End Headers
QuicSession Client (h3-25, 14) Received push stream 15 (0)
QuicSession Client (h3-25, 14) Starting header block for stream 15
QuicStream 15 (45, QuicSession Client (h3-25, 14)) Created
QuicSession Client (h3-25, 14) Adding stream 15 to session.
QuicStream 15 (45, QuicSession Client (h3-25, 14)) Beginning Headers
QuicSession Client (h3-25, 14) Receiving header for stream 15
QuicStream 15 (45, QuicSession Client (h3-25, 14)) Header - :status = 200
QuicSession Client (h3-25, 14) Ending header block for stream 15
QuicStream 15 (45, QuicSession Client (h3-25, 14)) End Headers
QuicStream 15 (45, QuicSession Client (h3-25, 14)) Receiving 7 bytes. Final? no. Readable? yes
QuicSession Client (h3-25, 14) Extending max stream 15 offset by 7 bytes
...

In the test case, the server is opening a push stream (Stream 15 in this case) and sending the text Testing back with a 200 status code. A separate 0 byte STREAM frame with the fin flag set is being received by the client (line 5 in the debug output above). Later, once the headers are processed, the application receives the 7 byte message. At this point, the push stream should close on the client side because (a) it is not writable and (b) fin has been received indicating there won't be any more data, but the close callback is never called for stream 15.

On a side note: it would be helpful for the nghttp3 on_recv_data callback to have a fin flag to indicate whether the chunk of data is the final chunk of data received for that stream.

Compatibility

Hi @tatsuhiro-t, I would like to know if this repo would cause any issues if used in conjunction with nghttp2. It doesn't look like it would, but I am just looking for a sanity check. Thank you :)

Support for HTTP/3 PRIORITY_UPDATE frame

Our experiments show benefits from using HTTP/3 PRIORITY_UPDATE frames over just the Priority header. We're interested in having client-side support for the frame in nghttp3.

About Encoder and Decoder Streams

According to RFC 9204 4.2
HTTP/3 endpoints contain a QPACK encoder and decoder. Each endpoint MUST initiate, **at most**, one encoder stream and, at most, one decoder stream

But according to Online documentation
HTTP/3 requires **at least** 3 local unidirectional streams for a control stream and QPACK encoder/decoder streams.

Is there a conflict with the RFC?

configure: line 17170: syntax error near unexpected token `0.20'

../configure --prefix=/home/jman/tmp/dltools-build-script/workspace --disable-examples --disable-shared --disable-werror --enable-http3 --enable-lib-only --with-cunit --with-jansson --with-jemalloc --with-libbpf --with-libcares --with-libnghttp3 --with-libngtcp2 --with-libxml2 --with-openssl --with-zlib
configure: WARNING: unrecognized options: --disable-examples, --enable-http3, --with-jansson, --with-jemalloc, --with-libbpf, --with-libcares, --with-libnghttp3, --with-libngtcp2, --with-libxml2, --with-openssl, --with-zlib
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/sed
checking for fgrep... /usr/local/bin/grep -F
checking for ld used by gcc... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm -B
checking the name lister (/usr/local/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/local/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/local/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/local/bin/ld -m elf_x86_64
checking if the linker (/usr/local/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
../configure: line 17170: syntax error near unexpected token `0.20'
../configure: line 17170: `PKG_PROG_PKG_CONFIG(0.20)'

Got this error on Ubuntu Jammy 22.04.2 and Debian 12 Bookworm.

My command line is below.

autoreconf -fi
mkdir build
cd build || exit 1
../configure --prefix=/home/jman/tmp/dltools-build-script/workspace             \
                         --disable-examples                                     \
                         --disable-shared                                       \
                         --disable-werror                                       \
                         --enable-http3                                         \
                         --enable-lib-only                                      \
                         --with-cunit                                           \
                         --with-jansson                                         \
                         --with-jemalloc                                        \
                         --with-libbpf                                          \
                         --with-libcares                                        \
                         --with-libnghttp3                                      \
                         --with-libngtcp2                                       \
                         --with-libxml2                                         \
                         --with-openssl                                         \
                         --with-zlib
make -j32
make install

I removed all configure options and still got the same error.

Setting priority for each URI

Hello,

How I can set urgency and incremental values for each URI at client side (ngtcp2 examples/client)?
I realized that in ngtcp2/examples/server.cc these values will be set if (1 << UF_QUERY), but I am not sure how I can add query as part of the request.

I have added priority in client_base.h as follows:
struct Request {
std::string_view scheme;
std::string authority;
std::string path;
std::string priority;
};

And I have changed submit_http_request in client.cc as follows:
std::array<nghttp3_nv, 7> nva{
util::make_nv(":method", config.http_method),
util::make_nv(":scheme", req.scheme),
util::make_nv(":authority", req.authority),
util::make_nv(":path", req.path),
util::make_nv("user-agent", "nghttp3/ngtcp2 client"),
util::make_nv("priority", req.priority),
};

Thanks in advance.

does nghttp3 supports multi threading?

i am working on a project, which supports low latency HLS streaming server.
I need HTTP3 library with RFC9218. i am using ngtcp2 & nghttp3. my server based on ngtcp2 example server.
one think i have noticed, all the requests from a client comes sequentially, even though they called simultaneously.
i mean http_end_stream callback for all stream ids called from same thread, sample log i have attached below in http_end_stream callback in the server example, log format is
time_string:current_thread_id: stream_id:message
some of GET calls will be blocked as file still being generated, is there any way we can make call_backs called from different threads. i.e separate thread each stream?

2023-03-08 15:43:21.551:0x1e6365880:0:GET /ll_hls/master.m3u8
2023-03-08 15:43:21.551:0x1e6365880:0:GET /ll_hls/master.m3u8 sent 308 bytes.
2023-03-08 15:43:21.632:0x1e6365880:4:GET /ll_hls/2M/lowLatencyHLS.m3u8
Reading :/usr/local/nginx/html/ll_hls/2M/prog_index.m3u8 completed after 0ms
2023-03-08 15:43:21.633:0x1e6365880:4:GET /ll_hls/2M/lowLatencyHLS.m3u8 sent 1872 bytes.
2023-03-08 15:43:21.636:0x1e6365880:8:GET /ll_hls/2M/lowLatencyHLS.m3u8?_HLS_msn=22&_HLS_part=0&_HLS_skip=YES
blocking read for:/usr/local/nginx/html/ll_hls/2M/prog_index.m3u8 completed after 520ms
2023-03-08 15:43:22.157:0x1e6365880:8:GET /ll_hls/2M/lowLatencyHLS.m3u8?_HLS_msn=22&_HLS_part=0&_HLS_skip=YES sent 1622 bytes.
2023-03-08 15:43:22.157:0x1e6365880:12:GET /ll_hls/2M/lowLatencySeg?segment=filePart21.2.ts
Reading :/usr/local/nginx/html/ll_hls/2M/prog_index.m3u8 completed after 0ms
2023-03-08 15:43:22.158:0x1e6365880:12:GET /ll_hls/2M/lowLatencySeg?segment=filePart21.2.ts sent 150400 bytes.
2023-03-08 15:43:22.158:0x1e6365880:16:GET /ll_hls/2M/lowLatencySeg?segment=filePart21.3.ts
Reading :/usr/local/nginx/html/ll_hls/2M/prog_index.m3u8 completed after 0ms
2023-03-08 15:43:22.158:0x1e6365880:16:GET /ll_hls/2M/lowLatencySeg?segment=filePart21.3.ts sent 148896 bytes.
2023-03-08 15:43:22.161:0x1e6365880:20:GET /ll_hls/2M/lowLatencyHLS.m3u8?_HLS_msn=22&_HLS_part=1&_HLS_skip=YES
blocking read for:/usr/local/nginx/html/ll_hls/2M/prog_index.m3u8 completed after 941ms
2023-03-08 15:43:23.103:0x1e6365880:20:GET /ll_hls/2M/lowLatencyHLS.m3u8?_HLS_msn=22&_HLS_part=1&_HLS_skip=YES sent 1711 bytes.
2023-03-08 15:43:23.103:0x1e6365880:24:GET /ll_hls/2M/lowLatencySeg?segment=filePart21.4.ts
Reading :/usr/local/nginx/html/ll_hls/2M/prog_index.m3u8 completed after 0ms
2023-03-08 15:43:23.104:0x1e6365880:24:GET /ll_hls/2M/lowLatencySeg?segment=filePart21.4.ts sent 150588 bytes.
2023-03-08 15:43:23.104:0x1e6365880:28:GET /ll_hls/2M/lowLatencySeg?segment=filePart22.1.ts
Reading :/usr/local/nginx/html/ll_hls/2M/prog_index.m3u8 completed after 0ms
2023-03-08 15:43:23.104:0x1e6365880:28:GET /ll_hls/2M/lowLatencySeg?segment=filePart22.1.ts sent 153408 bytes.

Compressed response header size

nghttp3 currently provides recv_header callback that returns HTTP response header name and HTTP response header value. But this is called after the QPACK decompression. Is there a way to get the size of the compressed response headers from nghttp3?

Compression of custom headers

Our product makes extensive use of custom headers. nghttp3 seems to only compress a set of well known headers, but not custom headers. We suspect that sending these headers using their literal representation hurts performance and user experience, especially in slow networks. Another library we're using allows the user to specify which custom headers should be compressed. Would it be possible to provide a similar capability in nghttp3?

Missing code example

An example of code to launch a very simple web server with nghttp3?

A lot of people are learning how to use projects via example code like this.

It would be nice to have a nghttp3_conn_update_ack_offset that takes an offset instead of length.

As in title. Right now nghttp3_conn_add_ack_offset can only support taking a length of newly ACKed data. It would be convenient if instead there was a version that could update the ack offset (with a check that it moves forward), reusing the same code. A reasonable name would be nghttp3_conn_update_ack_offset.

This would be convenient for a QUIC stack whose callback is offset based instead of length based.

NGHTTP3_NV_FLAG_NEVER_INDEX behavior

Is it expected behavior that if we set flag NGHTTP3_NV_FLAG_NEVER_INDEX for a header that is usually statically indexed, it will still be indexed with nghttp3_qpack_encoder_write_static_indexed_name()? I see it hitting that line regardless of the header value, so content-length = 0 for example would still be indexed as literal field line with static name reference.

Warnings on compile

I'm compiling nghttp3/0.8.0
cmake + compiler: mingw-w64 x86_64-7.2.0-win32-seh-rt_v5-rev1

On compile (successful) there a few warnings:

Scanning dependencies of target nghttp3_static
[  3%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_rcbuf.c.obj
[  6%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_mem.c.obj
[ 10%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_str.c.obj
[ 13%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_conv.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.c:26:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
[ 17%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_buf.c.obj
[ 20%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_ringbuf.c.obj
[ 24%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_pq.c.obj
[ 27%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_map.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:33:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c: In function 'nghttp3_map_print_distance':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:21: warning: unknown conversion type character 'z' in format [-Wformat=]
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                     ^~~~~~~~~~~~~~~~~~~~~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:58: note: format string is defined here
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                                                          ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:21: warning: unknown conversion type character 'z' in format [-Wformat=]
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                     ^~~~~~~~~~~~~~~~~~~~~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:71: note: format string is defined here
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                                                                       ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:21: warning: too many arguments for format [-Wformat-extra-args]
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                     ^~~~~~~~~~~~~~~~~~~~~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:21: warning: unknown conversion type character 'z' in format [-Wformat=]
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:58: note: format string is defined here
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                                                          ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:21: warning: unknown conversion type character 'z' in format [-Wformat=]
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                     ^~~~~~~~~~~~~~~~~~~~~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:71: note: format string is defined here
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                                                                       ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_map.c:144:21: warning: too many arguments for format [-Wformat-extra-args]
     fprintf(stderr, "@%u hash=%08x key=%" PRIu64 " base=%zu distance=%zu\n", i,
                     ^~~~~~~~~~~~~~~~~~~~~
[ 31%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_ksl.c.obj
C:\Temp\nghttp3-0.8.0\lib\nghttp3_ksl.c: In function 'ksl_print':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_ksl.c:729:24: warning: unknown conversion type character 'z' in format [-Wformat=]
   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
                        ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_ksl.c:729:30: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long long unsigned int}' [-Wformat=]
   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
                             ~^
                             %I64u
C:\Temp\nghttp3-0.8.0\lib\nghttp3_ksl.c:729:19: warning: too many arguments for format [-Wformat-extra-args]
   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
                   ^~~~~~~~~~~~~~~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_ksl.c:729:24: warning: unknown conversion type character 'z' in format [-Wformat=]
   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
                        ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_ksl.c:729:30: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t {aka long long unsigned int}' [-Wformat=]
   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
                             ~^
                             %I64u
C:\Temp\nghttp3-0.8.0\lib\nghttp3_ksl.c:729:19: warning: too many arguments for format [-Wformat-extra-args]
   fprintf(stderr, "LV=%zu n=%u\n", level, blk->n);
                   ^~~~~~~~~~~~~~~
[ 34%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_qpack.c.obj
[ 37%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_qpack_huffman.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_qpack_huffman.c:32:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
[ 41%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_qpack_huffman_data.c.obj
[ 44%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_err.c.obj
[ 48%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_debug.c.obj
[ 51%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_conn.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_conn.c:34:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
[ 55%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_stream.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_stream.c:31:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
[ 58%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_frame.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_frame.c:31:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
[ 62%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_tnode.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_tnode.c:32:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
[ 65%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_vec.c.obj
[ 68%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_gaptr.c.obj
[ 72%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_idtr.c.obj
[ 75%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_range.c.obj
[ 79%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_http.c.obj
In file included from C:\Temp\nghttp3-0.8.0\lib\nghttp3_http.c:33:0:
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohl':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:109:9: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res = *p++ << 24;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:110:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 16;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:111:7: warning: conversion to 'uint32_t {aka unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
   res += *p++ << 8;
       ^~
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h: In function 'ntohs':
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:119:9: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res = *p++ << 8;
         ^
C:\Temp\nghttp3-0.8.0\lib\nghttp3_conv.h:120:10: warning: conversion to 'uint16_t {aka short unsigned int}' from 'int' may alter its value [-Wconversion]
   res += *p;
          ^
[ 82%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_version.c.obj
[ 86%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_balloc.c.obj
[ 89%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_opl.c.obj
[ 93%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_objalloc.c.obj
[ 96%] Building C object lib/CMakeFiles/nghttp3_static.dir/nghttp3_unreachable.c.obj
[100%] Linking C static library libnghttp3.a
[100%] Built target nghttp3_static

Can it be fixed?

static lib built even if -DENABLE_STATIC_LIB=OFF is passed to cmake

On Windows 10, using msys2 + mingw-w64 :

cmake \
    -DCMAKE_TOOLCHAIN_FILE=../cross_toolchain.txt \
    -DCMAKE_INSTALL_PREFIX=$prefix_unix \
    -DCMAKE_VERBOSE_MAKEFILE:BOOL=$verbcmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DENABLE_SHARED_LIBS=ON \
    -DENABLE_STATIC_LIB=OFF \
    -DENABLE_DEBUG=OFF \
    -DENABLE_LIB_ONLY=ON \
    -DBUILD_TESTING=OFF \
    -G "Unix Makefiles" \
    ..

make -j $jobopt install

cmake output:

    Library:
      Shared:         ON
      Static:         ON

make output:

-- Installing: C:/Documents/msys2/home/vincent.torri/ewpi_64/lib/libnghttp3.dll.a
-- Installing: C:/Documents/msys2/home/vincent.torri/ewpi_64/bin/libnghttp3.dll
-- Installing: C:/Documents/msys2/home/vincent.torri/ewpi_64/lib/libnghttp3.a
-- Installing: C:/Documents/msys2/home/vincent.torri/ewpi_64/lib/pkgconfig/libnghttp3.pc

nghttp3: error building from tagged release archive 1.2.0 for OpenWrt

Hello @tatsuhiro-t @vszakats,

I'm building from last tagged release 1.2.0 and the unpacked source files do not include neither sfparse/, nor munit/, so the build fails with:

-- Configuring done (1.3s)
CMake Error at lib/CMakeLists.txt:68 (add_library):
  Cannot find source file:

    sfparse/sfparse.c


CMake Error at tests/CMakeLists.txt:44 (add_executable):
  Cannot find source file:

    munit/munit.c

Should the tagged release not include those? Am I doing something wrong?

Thanks!

C++ wrapper / boost integration

Hello and thanks for all efforts on this project.
I was curious to know if nghttp3 would have C++ wrapper library ? just like what we have currently in nghttp2 ?
Could we expect to have this in nghttp3 roadmap ?

Thanks,

Example

My dears, do u have a sample repository of a HTTP server with the lib? I'm with difficulties to understand the docs and the usage cases, and another example could be useful

Getting more data to a stream than we can currently deal with

In the curl issue curl/curl#4525, we're wrestling with the problem of having a fixed size buffer for HTTP/3 transfers and we might get more data in the nghttp3_recv_data than what currently fits in our buffer (because our buffer hasn't been drained yet by the consumer of our API).

With nghttp2, we can return a "pause" signal that made it possible for us to drain the buffer and then continue getting data and I think we will appreciate something like that here as well. Or possibly a way for us to say that "we received X bytes out of the N bytes delivered", and then be able to get the remaining part in a subsequent invoke. Or something.

We can reduce the risk of this happening by using a larger buffer, but we still risk that a high speed transfer can (occasionally) fill the buffer faster than the libcurl user drains it.

Thoughts?

cmake error on CMAKE_C_BYTE_ORDER

nghttp3 VERSION 0.12.0 configuration with cmake up to 3.12.4 fails on

if(${CMAKE_C_BYTE_ORDER} STREQUAL "BIG_ENDIAN")
  set(WORDS_BIGENDIAN 1)
endif()

while advertised cmake_minimum_required(VERSION 3.1)
maybe WORDS_BIGENDIAN should be some other way to respect advertised cmake version? Or turned to actual visible/manual option and not automatic one?
I'm deleting it for now - shoud it not pose any probllems on windows? (works OK - windows - little endian)

Why not make these fields const?

typedef struct nghttp3_nv {
  /**
   * :member:`name` is the header field name.
   */
  uint8_t *name;
  /**
   * :member:`value` is the header field value.
   */
  uint8_t *value;

Wouldn't it be better to make these const? Is there an expectation that they will be modified?

add msquic support for nghttp3

Hi,

it says that nghttp3 is QUIC-agnostic. so i am wondering how we can add msquic support for nghttp3.

Any thoughts on that is appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.