Commit d44ea6a3 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

http.server: Improve request logging in debug mode

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent a8950eb7
......@@ -88,6 +88,14 @@ class _HttpServerRequest(object):
# authentication)
self.private = None
def __repr__(self):
status = ["%s.%s" % (self.__class__.__module__, self.__class__.__name__),
self.request_method, self.request_path,
"headers=%r" % str(self.request_headers),
"body=%r" % (self.request_body, )]
return "<%s at %#x>" % (" ".join(status), id(self))
class _HttpServerToClientMessageWriter(http.HttpMessageWriter):
"""Writes an HTTP response to client.
......@@ -313,6 +321,8 @@ class HttpServerRequestExecutor(object):
logging.debug("Handling request %r", handler_context)
# Authentication, etc.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment