Skip to content

Commit 631d9df

Browse files
authored
1 parent 18b629b commit 631d9df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: hyper/http20/connection.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ def putrequest(self, method, selector, **kwargs):
505505
# ":path". We can set all of these now.
506506
s.add_header(":method", method)
507507
s.add_header(":scheme", "https" if self.secure else "http")
508-
s.add_header(":authority", self.host)
508+
port = "" if ((self.secure and self.port == 443) or (not self.secure and self.port == 80)) else (":" + str(self.port))
509+
s.add_header(":authority", self.host + port)
509510
s.add_header(":path", selector)
510511

511512
# Save the stream.

0 commit comments

Comments
 (0)