diff options
Diffstat (limited to 'docs/HTTP2.md')
-rw-r--r-- | docs/HTTP2.md | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/docs/HTTP2.md b/docs/HTTP2.md index b4e2983b..cc5a5b33 100644 --- a/docs/HTTP2.md +++ b/docs/HTTP2.md @@ -2,12 +2,13 @@ HTTP/2 with curl ================ [HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt) -[http2 explained](http://daniel.haxx.se/http2/) +[http2 explained](https://daniel.haxx.se/http2/) Build prerequisites ------------------- - nghttp2 - - OpenSSL, NSS, GnutTLS or PolarSSL with a new enough version + - OpenSSL, libressl, BoringSSL, NSS, GnutTLS, mbedTLS, wolfSSL or SChannel + with a new enough version. [nghttp2](https://nghttp2.org/) ------------------------------- @@ -36,23 +37,32 @@ Over an https:// URL If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce an option that will cause libcurl to fail if not possible to use HTTP/2. -Consider options to explicitly disable ALPN and/or NPN. + +`CURL_HTTP_VERSION_2TLS` was added in 7.47.0 as a way to ask libcurl to prefer +HTTP/2 for HTTPS but stick to 1.1 by default for plain old HTTP connections. ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is for a similar purpose, was made prior to ALPN and is used for SPDY so early HTTP/2 servers are implemented using NPN before ALPN support is widespread. +`CURLOPT_SSL_ENABLE_ALPN` and `CURLOPT_SSL_ENABLE_NPN` are offered to allow +applications to explicitly disable ALPN or NPN. + SSL libs -------- The challenge is the ALPN and NPN support and all our different SSL -backends. You may need a fairly updated SSL library version for it to -provide the necessary TLS features. Right now we support: - - - OpenSSL: ALPN and NPN - - NSS: ALPN and NPN - - GnuTLS: ALPN - - PolarSSL: ALPN +backends. You may need a fairly updated SSL library version for it to provide +the necessary TLS features. Right now we support: + + - OpenSSL: ALPN and NPN + - libressl: ALPN and NPN + - BoringSSL: ALPN and NPN + - NSS: ALPN and NPN + - GnuTLS: ALPN + - mbedTLS: ALPN + - SChannel: ALPN + - wolfSSL: ALPN Multiplexing ------------ @@ -84,7 +94,12 @@ in HTTP 1.1 style. This allows applications to work unmodified. curl tool --------- -curl offers the `--http2` command line option to enable use of HTTP/2 +curl offers the `--http2` command line option to enable use of HTTP/2. + +curl offers the `--http2-prior-knowledge` command line option to enable use of +HTTP/2 without HTTP/1.1 Upgrade. + +Since 7.47.0, the curl tool enables HTTP/2 by default for HTTPS connections. HTTP Alternative Services ------------------------- @@ -95,13 +110,4 @@ same origin server that you get the response from. A browser or long-living client can use that hint to create a new connection asynchronously. For libcurl, we may introduce a way to bring such clues to the applicaton and/or let a subsequent request use the alternate route -automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-05) - -TODO ----- - - - Provide API to set priorities / dependencies of individual streams - - - Implement "prior-knowledge" HTTP/2 connecitons over clear text so that - curl can connect with HTTP/2 at once without 1.1+Upgrade. - +automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-14) |