1
0
mirror of https://github.com/actix/actix-website synced 2024-11-30 11:12:57 +01:00
actix-website/docs/http2.md
Santiago 8393aea71a
migrate to docusaurus (v2) (#266)
Co-authored-by: ibraheemdev <ibrah1440@gmail.com>
2022-07-16 18:59:20 +09:00

1.5 KiB

title
HTTP/2

import RenderCodeBlock from '@theme/CodeBlock'; import CodeBlock from '@site/src/components/code_block.js'; import { actixWebMajorVersion } from "@site/vars";

actix-web automatically upgrades connections to HTTP/2 if possible.

Negotiation

When either of the rustls or openssl features are enabled, HttpServer provides the bind_rustls method and bind_openssl methods, respectively.

{`[dependencies] actix-web = { version = "${actixWebMajorVersion}", features = ["openssl"] } openssl = { version = "0.10", features = ["v110"] } `}

Upgrades to HTTP/2 described in RFC 7540 §3.2 are not supported. Starting HTTP/2 with prior knowledge is supported for both cleartext and TLS connections (RFC 7540 §3.4) (when using the lower level actix-http service builders).

Check out the TLS examples for concrete example.