We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3be20c5 commit 0aac921Copy full SHA for 0aac921
h11/_headers.py
@@ -206,6 +206,14 @@ def get_comma_header(headers, name):
206
207
def set_comma_header(headers, name, new_values):
208
# The header name `name` is expected to be lower-case bytes.
209
+ #
210
+ # Note that when we store the header we use title casing for the header
211
+ # names, in order to match the conventional HTTP header style.
212
213
+ # Simply calling `.title()` is a blunt approach, but it's correct
214
+ # here given the cases where we're using `set_comma_header`...
215
216
+ # Connection, Content-Length, Transfer-Encoding.
217
new_headers = []
218
for found_raw_name, found_name, found_raw_value in headers._full_items:
219
if found_name != name:
0 commit comments