[Zope3-checkins] SVN: Zope3/trunk/src/zope/server/http/publisherhttpserver.py Added workaround for issue 383.

Garrett Smith garrett at mojave-corp.com
Thu Mar 17 17:44:44 EST 2005


Log message for revision 29535:
  Added workaround for issue 383.

Changed:
  U   Zope3/trunk/src/zope/server/http/publisherhttpserver.py

-=-
Modified: Zope3/trunk/src/zope/server/http/publisherhttpserver.py
===================================================================
--- Zope3/trunk/src/zope/server/http/publisherhttpserver.py	2005-03-17 20:48:36 UTC (rev 29534)
+++ Zope3/trunk/src/zope/server/http/publisherhttpserver.py	2005-03-17 22:44:37 UTC (rev 29535)
@@ -24,6 +24,16 @@
 
     def __init__(self, request_factory, sub_protocol=None, *args, **kw):
 
+        # XXX This 'adjustment' to args[0] (the hostname for the HTTP server)
+        # under Windows is to get Zope to accept connections from other machines
+        # when the host name is omitted from the server address (in zope.conf).
+        # The address comes in as 'localhost' from ZConfig by way of some
+        # dubious special handling. See collector issue 383 for more info.
+        import sys
+        if sys.platform[:3] == "win" and args[0] == 'localhost':
+            args = ('',) + args[1:]
+
+
         # The common HTTP
         self.request_factory = request_factory
 



More information about the Zope3-Checkins mailing list