Show ip and port as "ip:port" in _handle logging

This commit is contained in:
jesopo 2019-03-11 12:14:29 +00:00
parent 9d91ea6ed4
commit 96f8777a8f

View file

@ -39,8 +39,8 @@ class Handler(http.server.BaseHTTPRequestHandler):
return [key_setting, minify]
def _handle(self, method):
_log.debug("[HTTP] starting _handle for %s from %s",
[method, self.client_address])
_log.debug("[HTTP] starting _handle for %s from %s:%d",
[method, self.client_address[0], self.client_address[1]])
path, endpoint, args = self._path_data()
headers = utils.CaseInsensitiveDict(dict(self.headers.items()))
@ -94,8 +94,8 @@ class Handler(http.server.BaseHTTPRequestHandler):
self._respond(code, headers, response)
_log.debug("[HTTP] finishing _handle for %s from %s",
[method, self.client_address])
_log.debug("[HTTP] finishing _handle for %s from %s:%d",
[method, self.client_address[0], self.client_address[1]])
def do_GET(self):
self._handle("GET")