expose sockname

This commit is contained in:
Maximilian Hils 2014-06-25 23:03:15 +02:00
parent decb6f998a
commit 84a016dccf
2 changed files with 5 additions and 2 deletions

View File

@ -897,8 +897,8 @@ class HTTPHandler(ProtocolHandler, TemporaryServerChangeMixin):
req = HTTPRequest.from_stream(self.c.client_conn.rfile,
body_size_limit=self.c.config.body_size_limit)
self.c.log("request", "debug", [req._assemble_first_line(req.form_in)])
send_upstream = self.process_request(flow, req)
if not send_upstream:
send_request_upstream = self.process_request(flow, req)
if not send_request_upstream:
return True
# Be careful NOT to assign the request to the flow before

View File

@ -69,6 +69,7 @@ class ServerConnection(tcp.TCPClient, stateobject.SimpleStateObject):
self.priority = priority
self.peername = None
self.sockname = None
self.timestamp_start = None
self.timestamp_end = None
self.timestamp_tcp_setup = None
@ -76,6 +77,7 @@ class ServerConnection(tcp.TCPClient, stateobject.SimpleStateObject):
_stateobject_attributes = dict(
peername=tuple,
sockname=tuple,
timestamp_start=float,
timestamp_end=float,
timestamp_tcp_setup=float,
@ -117,6 +119,7 @@ class ServerConnection(tcp.TCPClient, stateobject.SimpleStateObject):
self.timestamp_start = utils.timestamp()
tcp.TCPClient.connect(self)
self.peername = self.connection.getpeername()
self.sockname = self.connection.getsockname()
self.timestamp_tcp_setup = utils.timestamp()
def send(self, message):