SERVER_PORT should be a string. spotted by lericson on irc. while i'm

here fix tcp bind
This commit is contained in:
benoitc 2010-02-22 17:02:25 +01:00
parent 386fbd6e13
commit 47f755df9d
2 changed files with 3 additions and 3 deletions

View File

@ -129,9 +129,9 @@ class Request(object):
"CONTENT_TYPE": self.parser.headers_dict.get('Content-Type', ''),
"CONTENT_LENGTH": str(wsgi_input.len),
"REMOTE_ADDR": remote_addr[0],
"REMOTE_PORT": remote_addr[1],
"REMOTE_PORT": str(remote_addr[1]),
"SERVER_NAME": server_address[0],
"SERVER_PORT": server_address[1],
"SERVER_PORT": str(server_address[1]),
"SERVER_PROTOCOL": self.parser.raw_version
}

View File

@ -40,7 +40,7 @@ class BaseSocket(object):
return sock
def bind(self, sock):
sock.bind(sock)
sock.bind(self.address)
class TCPSocket(BaseSocket):