]> granicus.if.org Git - python/commitdiff
- Issue #3094: httplib.HTTPSConnection Host: headers no longer include the
authorGregory P. Smith <greg@mad-scientist.com>
Mon, 7 Jul 2008 05:09:12 +0000 (05:09 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Mon, 7 Jul 2008 05:09:12 +0000 (05:09 +0000)
  redundant ":443" port number designation when the connection is using the
  default https port (443).

Lib/httplib.py
Misc/NEWS

index 1bca5da645329009af2479e560be56ce3bba601d..81020b7810f6bceca1a54f81a4ab9bf230ee7514 100644 (file)
@@ -813,7 +813,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:
                         self.putheader('Host', "%s:%s" % (host_enc, self.port))
index c544739aefc04926e23d8ee0c645f383e252a33b..d94284940f4fd3453d6574762bfcad001442ab13 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -72,6 +72,10 @@ Library
   properly when raising an exception due to the bz2file being closed.
   Prevents a deadlock.
 
+- Issue #3094: httplib.HTTPSConnection Host: headers no longer include the
+  redundant ":443" port number designation when the connection is using the
+  default https port (443).
+
 Build
 -----