Better if placement

This commit is contained in:
Simon Sawicki 2024-11-26 21:43:37 +01:00
parent a4cad2af1c
commit 20832d0cdc
No known key found for this signature in database

View file

@ -317,6 +317,8 @@ class RequestsRH(RequestHandler, InstanceStoreMixin):
headers = self._merge_headers(request.headers) headers = self._merge_headers(request.headers)
add_accept_encoding_header(headers, SUPPORTED_ENCODINGS) add_accept_encoding_header(headers, SUPPORTED_ENCODINGS)
if request.extensions.get('keep_header_casing'):
headers = headers.sensitive()
max_redirects_exceeded = False max_redirects_exceeded = False
@ -325,9 +327,6 @@ class RequestsRH(RequestHandler, InstanceStoreMixin):
legacy_ssl_support=request.extensions.get('legacy_ssl'), legacy_ssl_support=request.extensions.get('legacy_ssl'),
) )
if request.extensions.get('keep_header_casing'):
headers = headers.sensitive()
try: try:
requests_res = session.request( requests_res = session.request(
method=request.method, method=request.method,