From: Senthil Kumaran Date: Sun, 29 Apr 2012 05:39:16 +0000 (+0800) Subject: Fix issue6085 - Remove the delay caused by fqdn lookup while logging in BaseHTTPReque... X-Git-Tag: v2.7.4rc1~868 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb5aebc1ccc9153508af0872accc094fdd3fd99a;p=thirdparty%2FPython%2Fcpython.git Fix issue6085 - Remove the delay caused by fqdn lookup while logging in BaseHTTPRequestHandler --- diff --git a/Doc/library/basehttpserver.rst b/Doc/library/basehttpserver.rst index 98b5ce4565e0..e5a9ebb16e58 100644 --- a/Doc/library/basehttpserver.rst +++ b/Doc/library/basehttpserver.rst @@ -240,7 +240,7 @@ to a handler. Code to create and run the server looks like this:: to create custom error logging mechanisms. The *format* argument is a standard printf-style format string, where the additional arguments to :meth:`log_message` are applied as inputs to the formatting. The client - address and current date and time are prefixed to every message logged. + ip address and current date and time are prefixed to every message logged. .. method:: version_string() diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py index 1a39485e161b..deaf2f960b83 100644 --- a/Lib/BaseHTTPServer.py +++ b/Lib/BaseHTTPServer.py @@ -447,13 +447,13 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler): specified as subsequent arguments (it's just like printf!). - The client host and current date/time are prefixed to - every message. + The client ip address and current date/time are prefixed to every + message. """ sys.stderr.write("%s - - [%s] %s\n" % - (self.address_string(), + (self.client_address[0], self.log_date_time_string(), format%args))