File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -540,10 +540,15 @@ async def _request(
540
540
if url .scheme not in self ._connector .allowed_protocol_schema_set :
541
541
raise NonHttpUrlClientError (url )
542
542
543
- skip_headers = set ( self . _skip_auto_headers )
543
+ skip_headers : Optional [ Iterable [ istr ]]
544
544
if skip_auto_headers is not None :
545
- for i in skip_auto_headers :
546
- skip_headers .add (istr (i ))
545
+ skip_headers = {
546
+ istr (i ) for i in skip_auto_headers
547
+ } | self ._skip_auto_headers
548
+ elif self ._skip_auto_headers :
549
+ skip_headers = self ._skip_auto_headers
550
+ else :
551
+ skip_headers = None
547
552
548
553
if proxy is None :
549
554
proxy = self ._default_proxy
@@ -670,7 +675,7 @@ async def _request(
670
675
url ,
671
676
params = params ,
672
677
headers = headers ,
673
- skip_auto_headers = skip_headers if skip_headers else None ,
678
+ skip_auto_headers = skip_headers ,
674
679
data = data ,
675
680
cookies = all_cookies ,
676
681
auth = auth ,
You can’t perform that action at this time.
0 commit comments