Skip to content

Commit a1502e1

Browse files
committed
docs(http1): clarify HTTP1 preserve case option
1 parent a12db28 commit a1502e1

File tree

4 files changed

+36
-8
lines changed

4 files changed

+36
-8
lines changed

src/client/client.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,15 @@ impl Builder {
10501050
self
10511051
}
10521052

1053-
/// Set whether HTTP/1 connections will write header names as provided
1054-
/// at the socket level.
1053+
/// Set whether to support preserving original header cases.
1054+
///
1055+
/// Currently, this will record the original cases received, and store them
1056+
/// in a private extension on the `Response`. It will also look for and use
1057+
/// such an extension in any provided `Request`.
1058+
///
1059+
/// Since the relevant extension is still private, there is no way to
1060+
/// interact with the original cases. The only effect this can have now is
1061+
/// to forward the cases in a proxy-like fashion.
10551062
///
10561063
/// Note that this setting does not affect HTTP/2.
10571064
///

src/client/conn.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,15 @@ impl Builder {
626626
self
627627
}
628628

629-
/// Set whether HTTP/1 connections will write header names as provided
630-
/// at the socket level.
629+
/// Set whether to support preserving original header cases.
630+
///
631+
/// Currently, this will record the original cases received, and store them
632+
/// in a private extension on the `Response`. It will also look for and use
633+
/// such an extension in any provided `Request`.
634+
///
635+
/// Since the relevant extension is still private, there is no way to
636+
/// interact with the original cases. The only effect this can have now is
637+
/// to forward the cases in a proxy-like fashion.
631638
///
632639
/// Note that this setting does not affect HTTP/2.
633640
///

src/server/conn.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,15 @@ impl<E> Http<E> {
352352
self
353353
}
354354

355-
/// Set whether HTTP/1 connections will write header names as provided
356-
/// at the socket level.
355+
/// Set whether to support preserving original header cases.
356+
///
357+
/// Currently, this will record the original cases received, and store them
358+
/// in a private extension on the `Request`. It will also look for and use
359+
/// such an extension in any provided `Response`.
360+
///
361+
/// Since the relevant extension is still private, there is no way to
362+
/// interact with the original cases. The only effect this can have now is
363+
/// to forward the cases in a proxy-like fashion.
357364
///
358365
/// Note that this setting does not affect HTTP/2.
359366
///

src/server/server.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,15 @@ impl<I, E> Builder<I, E> {
289289
self
290290
}
291291

292-
/// Set whether HTTP/1 connections will write header names as provided
293-
/// at the socket level.
292+
/// Set whether to support preserving original header cases.
293+
///
294+
/// Currently, this will record the original cases received, and store them
295+
/// in a private extension on the `Request`. It will also look for and use
296+
/// such an extension in any provided `Response`.
297+
///
298+
/// Since the relevant extension is still private, there is no way to
299+
/// interact with the original cases. The only effect this can have now is
300+
/// to forward the cases in a proxy-like fashion.
294301
///
295302
/// Note that this setting does not affect HTTP/2.
296303
///

0 commit comments

Comments
 (0)