changeset 4379:80c7fa620a4d

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 26 Apr 2007 18:41:18 -0500
parents e33ad7cea15f (current diff) 80d3f6f0d8e5 (diff)
children 6186b6cba8ea
files mercurial/hgweb/server.py
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/server.py	Wed Apr 25 13:14:01 2007 -0700
+++ b/mercurial/hgweb/server.py	Thu Apr 26 18:41:18 2007 -0500
@@ -43,13 +43,13 @@
 
     def log_error(self, format, *args):
         errorlog = self.server.errorlog
-        errorlog.write("%s - - [%s] %s\n" % (self.address_string(),
+        errorlog.write("%s - - [%s] %s\n" % (self.client_address[0],
                                              self.log_date_time_string(),
                                              format % args))
 
     def log_message(self, format, *args):
         accesslog = self.server.accesslog
-        accesslog.write("%s - - [%s] %s\n" % (self.address_string(),
+        accesslog.write("%s - - [%s] %s\n" % (self.client_address[0],
                                               self.log_date_time_string(),
                                               format % args))
 
@@ -80,12 +80,10 @@
         env['SERVER_PORT'] = str(self.server.server_port)
         env['REQUEST_URI'] = self.path
         env['PATH_INFO'] = path_info
+        env['REMOTE_HOST'] = self.client_address[0]
+        env['REMOTE_ADDR'] = self.client_address[0]
         if query:
             env['QUERY_STRING'] = query
-        host = self.address_string()
-        if host != self.client_address[0]:
-            env['REMOTE_HOST'] = host
-            env['REMOTE_ADDR'] = self.client_address[0]
 
         if self.headers.typeheader is None:
             env['CONTENT_TYPE'] = self.headers.type