From 7057fc9f89f0ce4d9ac01a12ea2f39768fb32be6 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Thu, 26 Mar 2026 15:04:34 +0100 Subject: [PATCH] Fix http_protocols documentation to use string syntax The http_protocols setting expects a comma-separated string, not a list. Updated all examples in the HTTP/2 guide. Fixes #3561 --- docs/content/2026-news.md | 3 +++ docs/content/guides/http2.md | 10 +++++----- docs/content/news.md | 3 +++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/content/2026-news.md b/docs/content/2026-news.md index 184158a0..c2aa73eb 100644 --- a/docs/content/2026-news.md +++ b/docs/content/2026-news.md @@ -12,6 +12,9 @@ - **ASGI Chunked EOF Handling**: Add `finish()` method to callback parser to handle chunked encoding edge case where connection closes before final CRLF after zero-chunk +- **HTTP/2 Documentation**: Fix `http_protocols` examples to use comma-separated string + instead of list syntax ([#3561](https://github.com/benoitc/gunicorn/issues/3561)) + ### Security - **ASGI Parser Header Validation**: Add security checks per RFC 9110/9112: diff --git a/docs/content/guides/http2.md b/docs/content/guides/http2.md index 26480175..d187b1de 100644 --- a/docs/content/guides/http2.md +++ b/docs/content/guides/http2.md @@ -47,7 +47,7 @@ Or in a configuration file: ```python # gunicorn.conf.py -http_protocols = ["h2", "h1"] +http_protocols = "h2, h1" ``` The order matters for ALPN negotiation - protocols are tried in order of preference. @@ -77,7 +77,7 @@ Or in a configuration file: # gunicorn.conf.py certfile = "/path/to/server.crt" keyfile = "/path/to/server.key" -http_protocols = ["h2", "h1"] +http_protocols = "h2, h1" ``` ### HTTP/2 Settings @@ -95,7 +95,7 @@ Example configuration: ```python # gunicorn.conf.py -http_protocols = ["h2", "h1"] +http_protocols = "h2, h1" http2_max_concurrent_streams = 200 http2_initial_window_size = 1048576 # 1MB ``` @@ -391,7 +391,7 @@ certfile = "/etc/letsencrypt/live/example.com/fullchain.pem" keyfile = "/etc/letsencrypt/live/example.com/privkey.pem" # HTTP/2 -http_protocols = ["h2", "h1"] +http_protocols = "h2, h1" http2_max_concurrent_streams = 100 ``` @@ -412,7 +412,7 @@ keyfile = "/path/to/server.key" ssl_version = "TLSv1_2" # Minimum TLS 1.2 for HTTP/2 # HTTP/2 -http_protocols = ["h2", "h1"] +http_protocols = "h2, h1" http2_max_concurrent_streams = 100 http2_initial_window_size = 65535 ``` diff --git a/docs/content/news.md b/docs/content/news.md index 6be3368d..1505fb85 100644 --- a/docs/content/news.md +++ b/docs/content/news.md @@ -12,6 +12,9 @@ - **ASGI Chunked EOF Handling**: Add `finish()` method to callback parser to handle chunked encoding edge case where connection closes before final CRLF after zero-chunk +- **HTTP/2 Documentation**: Fix `http_protocols` examples to use comma-separated string + instead of list syntax ([#3561](https://github.com/benoitc/gunicorn/issues/3561)) + ### Security - **ASGI Parser Header Validation**: Add security checks per RFC 9110/9112: