Fix issue6085 - Remove the delay caused by fqdn lookup while logging in BaseHTTPReque...
authorSenthil Kumaran <senthil@uthcode.com>
Sun, 29 Apr 2012 05:39:16 +0000 (13:39 +0800)
committerSenthil Kumaran <senthil@uthcode.com>
Sun, 29 Apr 2012 05:39:16 +0000 (13:39 +0800)
Doc/library/basehttpserver.rst
Lib/BaseHTTPServer.py

index 98b5ce4565e05338a5e499deb64db1b4f4d26413..e5a9ebb16e587119557d886614065a4f84578e4c 100644 (file)
@@ -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()
index 1a39485e161b5ca2eb8b263415b5641f20191228..deaf2f960b83c76b38b0c494db91202c70886833 100644 (file)
@@ -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))