Fix an issue with comparing str vs int port numbers
This commit is contained in:
parent
226efea6b0
commit
4ca5726af4
|
@ -102,7 +102,7 @@ class RoutePattern:
|
|||
server_hostname = request.environ["HOSTNAME"]
|
||||
else:
|
||||
server_hostname = self.hostname
|
||||
server_port = int(request.environ["SERVER_PORT"])
|
||||
server_port = request.environ["SERVER_PORT"]
|
||||
|
||||
if self.strict_hostname and request.hostname != server_hostname:
|
||||
return
|
||||
|
|
|
@ -140,7 +140,7 @@ class GeminiProtocol(LineOnlyReceiver):
|
|||
"REMOTE_ADDR": self.client_addr.host,
|
||||
"REMOTE_HOST": self.client_addr.host,
|
||||
"SERVER_NAME": self.server.hostname,
|
||||
"SERVER_PORT": str(self.client_addr.port),
|
||||
"SERVER_PORT": self.server.port,
|
||||
"SERVER_PROTOCOL": "GEMINI",
|
||||
"SERVER_SOFTWARE": f"jetforce/{__version__}",
|
||||
"TLS_CIPHER": conn.get_cipher_name(),
|
||||
|
|
Loading…
Reference in New Issue