mirror of
https://github.com/actix/actix-website
synced 2025-02-20 03:14:22 +01:00
* chore: add VS Code extension recommendations * Update image URLs in README and documentation files * chore: disable no-inline-html rule * chore: use standard md/mdx syntax, and use .jsx for react components * chore: fix email links in Code of Conduct The commit message suggests fixing the email links in the Code of Conduct file to use the correct `mailto:` syntax. * chore: update actix-web error helper links Update the links to the `actix-web` error helper traits in the `databases.md` and `errors.md` files to use the correct URLs. * chore: restore unused actix-web error helper links * Update src/pages/community/coc.md Co-authored-by: Rob Ede <robjtede@icloud.com> * Update docs/getting-started.md Co-authored-by: Rob Ede <robjtede@icloud.com> --------- Co-authored-by: Rob Ede <robjtede@icloud.com>
31 lines
1.4 KiB
Markdown
31 lines
1.4 KiB
Markdown
---
|
|
title: HTTP/2
|
|
---
|
|
|
|
import RenderCodeBlock from '@theme/CodeBlock'; import CodeBlock from '@site/src/components/code_block'; import { actixWebMajorVersion } from "@site/vars";
|
|
|
|
`actix-web` automatically upgrades connections to _HTTP/2_ if possible.
|
|
|
|
# Negotiation
|
|
|
|
<!-- TODO: use rustls example -->
|
|
|
|
When either of the `rustls` or `openssl` features are enabled, `HttpServer` provides the [`bind_rustls()`][bindrustls] method and [`bind_openssl()`][bindopenssl] methods, respectively.
|
|
|
|
<!-- DEPENDENCY -->
|
|
|
|
<CodeBlock example="http2" file="manifest" section="deps" language="toml"></CodeBlock>
|
|
|
|
<CodeBlock example="http2" file="main.rs" section="main" />
|
|
|
|
Upgrades to HTTP/2 described in [RFC 7540 §3.2][rfcsection32] are not supported. Starting HTTP/2 with prior knowledge is supported for both cleartext and TLS connections ([RFC 7540 §3.4][rfcsection34]) (when using the lower level `actix-http` service builders).
|
|
|
|
> Check out [the TLS examples][examples] for concrete example.
|
|
|
|
[rfcsection32]: https://httpwg.org/specs/rfc7540.html#rfc.section.3.2
|
|
[rfcsection34]: https://httpwg.org/specs/rfc7540.html#rfc.section.3.4
|
|
[bindrustls]: https://docs.rs/actix-web/4/actix_web/struct.HttpServer.html#method.bind_rustls_0_22
|
|
[bindopenssl]: https://docs.rs/actix-web/4/actix_web/struct.HttpServer.html#method.bind_openssl
|
|
[tlsalpn]: https://tools.ietf.org/html/rfc7301
|
|
[examples]: https://github.com/actix/examples/tree/master/https-tls
|