|
17 | 17 | from ._http import AWSRequest, Field, URI |
18 | 18 | from ._io import AsyncBytesReader |
19 | 19 | from .exceptions import AWSSDKWarning, MissingExpectedParameterException |
| 20 | +from .interfaces.http import URI as InterfaceURI |
20 | 21 | from .interfaces.identity import AWSCredentialsIdentity as _AWSCredentialsIdentity |
21 | 22 | from .interfaces.io import AsyncSeekable, ConditionallySeekable, Seekable |
22 | 23 |
|
@@ -345,12 +346,12 @@ def _is_signable_header(self, field_name: str): |
345 | 346 | return False |
346 | 347 | return True |
347 | 348 |
|
348 | | - def _normalize_host_field(self, *, uri: URI) -> str: |
| 349 | + def _normalize_host_field(self, *, uri: InterfaceURI) -> str: |
349 | 350 | if uri.port is not None and DEFAULT_PORTS.get(uri.scheme) == uri.port: |
350 | 351 | uri_dict = uri.to_dict() |
351 | 352 | uri_dict.update({"port": None}) |
352 | 353 | uri = URI(**uri_dict) |
353 | | - host_header = uri.hostname |
| 354 | + host_header = uri.host |
354 | 355 | if port := uri.port: |
355 | 356 | host_header += f":{port}" |
356 | 357 | return host_header |
@@ -733,12 +734,12 @@ def _is_signable_header(self, field_name: str): |
733 | 734 | return False |
734 | 735 | return True |
735 | 736 |
|
736 | | - async def _normalize_host_field(self, *, uri: URI) -> str: |
| 737 | + async def _normalize_host_field(self, *, uri: InterfaceURI) -> str: |
737 | 738 | if uri.port is not None and DEFAULT_PORTS.get(uri.scheme) == uri.port: |
738 | 739 | uri_dict = uri.to_dict() |
739 | 740 | uri_dict.update({"port": None}) |
740 | 741 | uri = URI(**uri_dict) |
741 | | - host_header = uri.hostname |
| 742 | + host_header = uri.host |
742 | 743 | if port := uri.port: |
743 | 744 | host_header += f":{port}" |
744 | 745 | return host_header |
|
0 commit comments