@@ -560,27 +560,27 @@ def _clean_up_response_headers_for_sending(self, response):
560560 # but the HTTP spec says that if our peer does this then we have
561561 # to fix it instead of erroring out, so we'll accord the user the
562562 # same respect).
563- headers = set_comma_header (headers , b"Content-Length " , [])
563+ headers = set_comma_header (headers , b"content-length " , [])
564564 if self .their_http_version is None or self .their_http_version < b"1.1" :
565565 # Either we never got a valid request and are sending back an
566566 # error (their_http_version is None), so we assume the worst;
567567 # or else we did get a valid HTTP/1.0 request, so we know that
568568 # they don't understand chunked encoding.
569- headers = set_comma_header (headers , b"Transfer-Encoding " , [])
569+ headers = set_comma_header (headers , b"transfer-encoding " , [])
570570 # This is actually redundant ATM, since currently we
571571 # unconditionally disable keep-alive when talking to HTTP/1.0
572572 # peers. But let's be defensive just in case we add
573573 # Connection: keep-alive support later:
574574 if self ._request_method != b"HEAD" :
575575 need_close = True
576576 else :
577- headers = set_comma_header (headers , b"Transfer-Encoding " , ["chunked" ])
577+ headers = set_comma_header (headers , b"transfer-encoding " , ["chunked" ])
578578
579579 if not self ._cstate .keep_alive or need_close :
580580 # Make sure Connection: close is set
581581 connection = set (get_comma_header (headers , b"connection" ))
582582 connection .discard (b"keep-alive" )
583583 connection .add (b"close" )
584- headers = set_comma_header (headers , b"Connection " , sorted (connection ))
584+ headers = set_comma_header (headers , b"connection " , sorted (connection ))
585585
586586 response .headers = headers
0 commit comments