mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
SERVER_PORT should be a string. spotted by lericson on irc. while i'm
here fix tcp bind
This commit is contained in:
parent
386fbd6e13
commit
47f755df9d
@ -129,9 +129,9 @@ class Request(object):
|
|||||||
"CONTENT_TYPE": self.parser.headers_dict.get('Content-Type', ''),
|
"CONTENT_TYPE": self.parser.headers_dict.get('Content-Type', ''),
|
||||||
"CONTENT_LENGTH": str(wsgi_input.len),
|
"CONTENT_LENGTH": str(wsgi_input.len),
|
||||||
"REMOTE_ADDR": remote_addr[0],
|
"REMOTE_ADDR": remote_addr[0],
|
||||||
"REMOTE_PORT": remote_addr[1],
|
"REMOTE_PORT": str(remote_addr[1]),
|
||||||
"SERVER_NAME": server_address[0],
|
"SERVER_NAME": server_address[0],
|
||||||
"SERVER_PORT": server_address[1],
|
"SERVER_PORT": str(server_address[1]),
|
||||||
"SERVER_PROTOCOL": self.parser.raw_version
|
"SERVER_PROTOCOL": self.parser.raw_version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class BaseSocket(object):
|
|||||||
return sock
|
return sock
|
||||||
|
|
||||||
def bind(self, sock):
|
def bind(self, sock):
|
||||||
sock.bind(sock)
|
sock.bind(self.address)
|
||||||
|
|
||||||
class TCPSocket(BaseSocket):
|
class TCPSocket(BaseSocket):
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user