summaryrefslogtreecommitdiff
path: root/Lib/http/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/http/client.py')
-rw-r--r--Lib/http/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 96bcd72a93..4a078d3888 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -783,7 +783,7 @@ class HTTPConnection:
host_enc = self.host.encode("ascii")
except UnicodeEncodeError:
host_enc = self.host.encode("idna")
- if self.port == HTTP_PORT:
+ if self.port == self.default_port:
self.putheader('Host', host_enc)
else:
host_enc = host_enc.decode("ascii")