From a1502e1067d28b5fc1883e48ac7daacf2fbe4b9e Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Tue, 16 Nov 2021 11:29:33 -0800 Subject: [PATCH] docs(http1): clarify HTTP1 preserve case option --- src/client/client.rs | 11 +++++++++-- src/client/conn.rs | 11 +++++++++-- src/server/conn.rs | 11 +++++++++-- src/server/server.rs | 11 +++++++++-- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/client/client.rs b/src/client/client.rs index 9125ff2ad7..6d9d678702 100644 --- a/src/client/client.rs +++ b/src/client/client.rs @@ -1050,8 +1050,15 @@ impl Builder { self } - /// Set whether HTTP/1 connections will write header names as provided - /// at the socket level. + /// Set whether to support preserving original header cases. + /// + /// Currently, this will record the original cases received, and store them + /// in a private extension on the `Response`. It will also look for and use + /// such an extension in any provided `Request`. + /// + /// Since the relevant extension is still private, there is no way to + /// interact with the original cases. The only effect this can have now is + /// to forward the cases in a proxy-like fashion. /// /// Note that this setting does not affect HTTP/2. /// diff --git a/src/client/conn.rs b/src/client/conn.rs index 2aa09a7ffb..5f087a55e1 100644 --- a/src/client/conn.rs +++ b/src/client/conn.rs @@ -626,8 +626,15 @@ impl Builder { self } - /// Set whether HTTP/1 connections will write header names as provided - /// at the socket level. + /// Set whether to support preserving original header cases. + /// + /// Currently, this will record the original cases received, and store them + /// in a private extension on the `Response`. It will also look for and use + /// such an extension in any provided `Request`. + /// + /// Since the relevant extension is still private, there is no way to + /// interact with the original cases. The only effect this can have now is + /// to forward the cases in a proxy-like fashion. /// /// Note that this setting does not affect HTTP/2. /// diff --git a/src/server/conn.rs b/src/server/conn.rs index 1bb8e8d676..b71f144768 100644 --- a/src/server/conn.rs +++ b/src/server/conn.rs @@ -352,8 +352,15 @@ impl Http { self } - /// Set whether HTTP/1 connections will write header names as provided - /// at the socket level. + /// Set whether to support preserving original header cases. + /// + /// Currently, this will record the original cases received, and store them + /// in a private extension on the `Request`. It will also look for and use + /// such an extension in any provided `Response`. + /// + /// Since the relevant extension is still private, there is no way to + /// interact with the original cases. The only effect this can have now is + /// to forward the cases in a proxy-like fashion. /// /// Note that this setting does not affect HTTP/2. /// diff --git a/src/server/server.rs b/src/server/server.rs index 4b09dd7c9f..3f5261cb42 100644 --- a/src/server/server.rs +++ b/src/server/server.rs @@ -289,8 +289,15 @@ impl Builder { self } - /// Set whether HTTP/1 connections will write header names as provided - /// at the socket level. + /// Set whether to support preserving original header cases. + /// + /// Currently, this will record the original cases received, and store them + /// in a private extension on the `Request`. It will also look for and use + /// such an extension in any provided `Response`. + /// + /// Since the relevant extension is still private, there is no way to + /// interact with the original cases. The only effect this can have now is + /// to forward the cases in a proxy-like fashion. /// /// Note that this setting does not affect HTTP/2. ///