--- a/mercurial/hgweb/server.py Sat Jun 09 13:25:54 2007 +0200
+++ b/mercurial/hgweb/server.py Sun Jun 10 19:16:20 2007 -0500
@@ -216,14 +216,10 @@
return hgwebobj
self.reqmaker = wsgiapplication(make_handler)
- addr, port = self.socket.getsockname()[:2]
- if addr in ('0.0.0.0', '::'):
+ addr = address
+ if addr in ('', '::'):
addr = socket.gethostname()
- else:
- try:
- addr = socket.gethostbyaddr(addr)[0]
- except socket.error:
- pass
+
self.addr, self.port = addr, port
class IPv6HTTPServer(MercurialHTTPServer):