Show More
@@ -43,13 +43,13 b' class _hgwebhandler(object, BaseHTTPServ' | |||||
43 |
|
43 | |||
44 | def log_error(self, format, *args): |
|
44 | def log_error(self, format, *args): | |
45 | errorlog = self.server.errorlog |
|
45 | errorlog = self.server.errorlog | |
46 |
errorlog.write("%s - - [%s] %s\n" % (self.address |
|
46 | errorlog.write("%s - - [%s] %s\n" % (self.client_address[0], | |
47 | self.log_date_time_string(), |
|
47 | self.log_date_time_string(), | |
48 | format % args)) |
|
48 | format % args)) | |
49 |
|
49 | |||
50 | def log_message(self, format, *args): |
|
50 | def log_message(self, format, *args): | |
51 | accesslog = self.server.accesslog |
|
51 | accesslog = self.server.accesslog | |
52 |
accesslog.write("%s - - [%s] %s\n" % (self.address |
|
52 | accesslog.write("%s - - [%s] %s\n" % (self.client_address[0], | |
53 | self.log_date_time_string(), |
|
53 | self.log_date_time_string(), | |
54 | format % args)) |
|
54 | format % args)) | |
55 |
|
55 | |||
@@ -80,12 +80,10 b' class _hgwebhandler(object, BaseHTTPServ' | |||||
80 | env['SERVER_PORT'] = str(self.server.server_port) |
|
80 | env['SERVER_PORT'] = str(self.server.server_port) | |
81 | env['REQUEST_URI'] = self.path |
|
81 | env['REQUEST_URI'] = self.path | |
82 | env['PATH_INFO'] = path_info |
|
82 | env['PATH_INFO'] = path_info | |
|
83 | env['REMOTE_HOST'] = self.client_address[0] | |||
|
84 | env['REMOTE_ADDR'] = self.client_address[0] | |||
83 | if query: |
|
85 | if query: | |
84 | env['QUERY_STRING'] = query |
|
86 | env['QUERY_STRING'] = query | |
85 | host = self.address_string() |
|
|||
86 | if host != self.client_address[0]: |
|
|||
87 | env['REMOTE_HOST'] = host |
|
|||
88 | env['REMOTE_ADDR'] = self.client_address[0] |
|
|||
89 |
|
87 | |||
90 | if self.headers.typeheader is None: |
|
88 | if self.headers.typeheader is None: | |
91 | env['CONTENT_TYPE'] = self.headers.type |
|
89 | env['CONTENT_TYPE'] = self.headers.type |
General Comments 0
You need to be logged in to leave comments.
Login now