@@ -560,27 +560,27 @@ def _clean_up_response_headers_for_sending(self, response):
560
560
# but the HTTP spec says that if our peer does this then we have
561
561
# to fix it instead of erroring out, so we'll accord the user the
562
562
# same respect).
563
- headers = set_comma_header (headers , b"Content-Length " , [])
563
+ headers = set_comma_header (headers , b"content-length " , [])
564
564
if self .their_http_version is None or self .their_http_version < b"1.1" :
565
565
# Either we never got a valid request and are sending back an
566
566
# error (their_http_version is None), so we assume the worst;
567
567
# or else we did get a valid HTTP/1.0 request, so we know that
568
568
# they don't understand chunked encoding.
569
- headers = set_comma_header (headers , b"Transfer-Encoding " , [])
569
+ headers = set_comma_header (headers , b"transfer-encoding " , [])
570
570
# This is actually redundant ATM, since currently we
571
571
# unconditionally disable keep-alive when talking to HTTP/1.0
572
572
# peers. But let's be defensive just in case we add
573
573
# Connection: keep-alive support later:
574
574
if self ._request_method != b"HEAD" :
575
575
need_close = True
576
576
else :
577
- headers = set_comma_header (headers , b"Transfer-Encoding " , ["chunked" ])
577
+ headers = set_comma_header (headers , b"transfer-encoding " , ["chunked" ])
578
578
579
579
if not self ._cstate .keep_alive or need_close :
580
580
# Make sure Connection: close is set
581
581
connection = set (get_comma_header (headers , b"connection" ))
582
582
connection .discard (b"keep-alive" )
583
583
connection .add (b"close" )
584
- headers = set_comma_header (headers , b"Connection " , sorted (connection ))
584
+ headers = set_comma_header (headers , b"connection " , sorted (connection ))
585
585
586
586
response .headers = headers
0 commit comments