Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Nov 20, 2024
1 parent 4df2fe3 commit dfde917
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,12 @@ async def _request(
if url.scheme not in self._connector.allowed_protocol_schema_set:
raise NonHttpUrlClientError(url)

skip_headers: Optional[set[str]] = None
skip_headers = (
None if skip_auto_headers is None else {istr(i) for i in skip_auto_headers}
)
skip_headers: Optional[Union[frozenset[istr], set[istr]]] = None
if skip_auto_headers is not None:
skip_headers = {istr(i) for i in skip_auto_headers}
skip_headers.update(self._skip_auto_headers)
elif self._skip_auto_headers is not None:
skip_headers = self._skip_auto_headers

if proxy is None:
proxy = self._default_proxy
Expand Down

0 comments on commit dfde917

Please sign in to comment.