[Zope-Checkins] SVN: Zope/trunk/lib/python/ZServer/ - Make it so webdav-source server is distinguishable from the default http server in the ZMI and event.log

2005-05-20 Thread Sidnei da Silva
Log message for revision 30467:
  
  - Make it so webdav-source server is distinguishable from the default http 
server in the ZMI and event.log
  

Changed:
  U   Zope/trunk/lib/python/ZServer/HTTPServer.py
  U   Zope/trunk/lib/python/ZServer/datatypes.py

-=-
Modified: Zope/trunk/lib/python/ZServer/HTTPServer.py
===
--- Zope/trunk/lib/python/ZServer/HTTPServer.py 2005-05-20 15:56:59 UTC (rev 
30466)
+++ Zope/trunk/lib/python/ZServer/HTTPServer.py 2005-05-20 17:23:05 UTC (rev 
30467)
@@ -380,8 +380,8 @@
 class zhttp_server(http_server):
 http server
 
-SERVER_IDENT='Zope/%s ZServer/%s' % (ZOPE_VERSION,ZSERVER_VERSION)
-
+SERVER_IDENT = 'Zope/%s ZServer/%s' % (ZOPE_VERSION, ZSERVER_VERSION)
+server_protocol = 'HTTP'
 channel_class = zhttp_channel
 shutup=0
 
@@ -389,16 +389,17 @@
 self.shutup=1
 http_server.__init__(self, ip, port, resolver, logger_object)
 self.shutup=0
-self.log_info('HTTP server started at %s\n'
+self.log_info('%s server started at %s\n'
   '\tHostname: %s\n\tPort: %d' % (
-time.ctime(time.time()),
-self.server_name,
-self.server_port
-))
+self.server_protocol,
+time.ctime(time.time()),
+self.server_name,
+self.server_port
+))
 
 def clean_shutdown_control(self,phase,time_in_this_phase):
 if phase==2:
-self.log_info('closing HTTP to new connections')
+self.log_info('closing %s to new connections' % 
self.server_protocol)
 self.close()
 
 def log_info(self, message, type='info'):
@@ -418,3 +419,6 @@
 # override asyncore limits for nt's listen queue size
 self.accepting = 1
 return self.socket.listen (num)
+
+class zwebdav_server(zhttp_server):
+server_protocol = 'WebDAV'

Modified: Zope/trunk/lib/python/ZServer/datatypes.py
===
--- Zope/trunk/lib/python/ZServer/datatypes.py  2005-05-20 15:56:59 UTC (rev 
30466)
+++ Zope/trunk/lib/python/ZServer/datatypes.py  2005-05-20 17:23:05 UTC (rev 
30467)
@@ -58,27 +58,29 @@
 
 
 class HTTPServerFactory(ServerFactory):
+
 def __init__(self, section):
+from ZServer import HTTPServer
 if not section.address:
 raise ZConfig.ConfigurationError(
 No 'address' settings found 
 within the 'http-server' or 'webdav-source-server' section)
 ServerFactory.__init__(self, section.address)
+self.server_class = HTTPServer.zhttp_server
 self.force_connection_close = section.force_connection_close
 # webdav-source-server sections won't have webdav_source_clients:
 webdav_clients = getattr(section, webdav_source_clients, None)
 self.webdav_source_clients = webdav_clients
 
 def create(self):
-from ZServer import HTTPServer
 from ZServer.AccessLogger import access_logger
 handler = self.createHandler()
 handler._force_connection_close = self.force_connection_close
 if self.webdav_source_clients:
 handler.set_webdav_source_clients(self.webdav_source_clients)
-server = HTTPServer.zhttp_server(ip=self.ip, port=self.port,
- resolver=self.dnsresolver,
- logger_object=access_logger)
+server = self.server_class(ip=self.ip, port=self.port,
+   resolver=self.dnsresolver,
+   logger_object=access_logger)
 server.install_handler(handler)
 return server
 
@@ -88,6 +90,12 @@
 
 
 class WebDAVSourceServerFactory(HTTPServerFactory):
+
+def __init__(self, section):
+from ZServer import HTTPServer
+HTTPServerFactory.__init__(self, section)
+self.server_class = HTTPServer.zwebdav_server
+
 def createHandler(self):
 from ZServer.WebDAVSrcHandler import WebDAVSrcHandler
 return WebDAVSrcHandler(self.module, '', self.cgienv)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/ZServer - HTTPServer.py:1.46.2.5 datatypes.py:1.2.8.3

2005-05-20 Thread Sidnei da Silva
Update of /cvs-repository/Zope/lib/python/ZServer
In directory cvs.zope.org:/tmp/cvs-serv16993

Modified Files:
  Tag: Zope-2_7-branch
HTTPServer.py datatypes.py 
Log Message:

- Make it so webdav-source server is distinguishable from the default http 
server in the ZMI and event.log


=== Zope/lib/python/ZServer/HTTPServer.py 1.46.2.4 = 1.46.2.5 ===
--- Zope/lib/python/ZServer/HTTPServer.py:1.46.2.4  Wed Dec  1 18:01:48 2004
+++ Zope/lib/python/ZServer/HTTPServer.py   Fri May 20 13:39:52 2005
@@ -380,8 +380,8 @@
 class zhttp_server(http_server):
 http server
 
-SERVER_IDENT='Zope/%s ZServer/%s' % (ZOPE_VERSION,ZSERVER_VERSION)
-
+SERVER_IDENT = 'Zope/%s ZServer/%s' % (ZOPE_VERSION, ZSERVER_VERSION)
+server_protocol = 'HTTP'
 channel_class = zhttp_channel
 shutup=0
 
@@ -389,16 +389,17 @@
 self.shutup=1
 http_server.__init__(self, ip, port, resolver, logger_object)
 self.shutup=0
-self.log_info('HTTP server started at %s\n'
+self.log_info('%s server started at %s\n'
   '\tHostname: %s\n\tPort: %d' % (
-time.ctime(time.time()),
-self.server_name,
-self.server_port
-))
+self.server_protocol,
+time.ctime(time.time()),
+self.server_name,
+self.server_port
+))
 
 def clean_shutdown_control(self,phase,time_in_this_phase):
 if phase==2:
-self.log_info('closing HTTP to new connections')
+self.log_info('closing %s to new connections' % 
self.server_protocol)
 self.close()
 
 def log_info(self, message, type='info'):
@@ -418,3 +419,6 @@
 # override asyncore limits for nt's listen queue size
 self.accepting = 1
 return self.socket.listen (num)
+
+class zwebdav_server(zhttp_server):
+server_protocol = 'WebDAV'


=== Zope/lib/python/ZServer/datatypes.py 1.2.8.2 = 1.2.8.3 ===
--- Zope/lib/python/ZServer/datatypes.py:1.2.8.2Fri May 28 02:13:23 2004
+++ Zope/lib/python/ZServer/datatypes.pyFri May 20 13:39:53 2005
@@ -53,26 +53,27 @@
 
 class HTTPServerFactory(ServerFactory):
 def __init__(self, section):
+from ZServer import HTTPServer
 if not section.address:
 raise ZConfig.ConfigurationError(
 No 'address' settings found 
 within the 'http-server' or 'webdav-source-server' section)
 ServerFactory.__init__(self, section.address)
+self.server_class = HTTPServer.zhttp_server
 self.force_connection_close = section.force_connection_close
 # webdav-source-server sections won't have webdav_source_clients:
 webdav_clients = getattr(section, webdav_source_clients, None)
 self.webdav_source_clients = webdav_clients
 
 def create(self):
-from ZServer import HTTPServer
 from ZServer.AccessLogger import access_logger
 handler = self.createHandler()
 handler._force_connection_close = self.force_connection_close
 if self.webdav_source_clients:
 handler.set_webdav_source_clients(self.webdav_source_clients)
-server = HTTPServer.zhttp_server(ip=self.host, port=self.port,
- resolver=self.dnsresolver,
- logger_object=access_logger)
+server = self.server_class(ip=self.host, port=self.port,
+   resolver=self.dnsresolver,
+   logger_object=access_logger)
 server.install_handler(handler)
 return server
 
@@ -82,6 +83,11 @@
 
 
 class WebDAVSourceServerFactory(HTTPServerFactory):
+def __init__(self, section):
+from ZServer import HTTPServer
+HTTPServerFactory.__init__(self, section)
+self.server_class = HTTPServer.zwebdav_server
+
 def createHandler(self):
 from ZServer.WebDAVSrcHandler import WebDAVSrcHandler
 return WebDAVSrcHandler(self.module, '', self.cgienv)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/doc - CHANGES.txt:1.625.2.332

2005-05-20 Thread Sidnei da Silva
Update of /cvs-repository/Zope/doc
In directory cvs.zope.org:/tmp/cvs-serv18142/doc

Modified Files:
  Tag: Zope-2_7-branch
CHANGES.txt 
Log Message:

- Note about the change


=== Zope/doc/CHANGES.txt 1.625.2.331 = 1.625.2.332 ===
--- Zope/doc/CHANGES.txt:1.625.2.331Tue May 17 14:10:41 2005
+++ Zope/doc/CHANGES.txtFri May 20 13:43:58 2005
@@ -3,15 +3,18 @@
   This file contains change information for the current Zope release.
   Change information for previous versions of Zope can be found in the
   file HISTORY.txt.
-  
+
 
   after Zope 2.7.6 (unreleased)
 
 Bugs fixed
 
+  - Made WebDAV server distinguishable from the default HTTP
+server both in the ZMI and in event.log.
+
   - Collector #1784: fixed handling of multiple attributes in ZCTextIndex
 
-  - Collector #1751: Improved error reporting reporting during the 
+  - Collector #1751: Improved error reporting reporting during the
 startup phase
 
   - Collector #1745: Fixed ZSQL error KeyError 'query'
@@ -22,8 +25,8 @@
 
 Bugs fixed
 
-  - The previous fix to ZopeUndo/Prefix.py for collector #1726 
-introduced a new bug. This is fixed, but in order to avoid 
+  - The previous fix to ZopeUndo/Prefix.py for collector #1726
+introduced a new bug. This is fixed, but in order to avoid
 bug #1726 in a ZEO environment, you should upgrade the
 ZEO server to at least ZODB 3.2.8 (ships with Zope 2.7.6 final).
 For details, see the ZODB 3.2.8 NEWS file.
@@ -51,9 +54,9 @@
   - Collector #1460: Backported test for this bug (which was *not*
 present on the Zope 2.7 branch).
 
-  - Collector #1726: Transactions from a folder /foo would incorrectly 
+  - Collector #1726: Transactions from a folder /foo would incorrectly
 appear in the Undo management screen for a folder /foobar.
-Fixed so that a prefix must be considered as a path. 
+Fixed so that a prefix must be considered as a path.
 
   - ZPublisher would fail to recognize a XML-RPC request if the
 content-type header included a 'charset' parameter.
@@ -160,7 +163,7 @@
   - Collector #1657: Don't break host-based virtual hosting when
 purging an HTTP accelerator cache.
 
-  - Collector: #1651: removed compiler warning 
+  - Collector: #1651: removed compiler warning
 
   Zope 2.7.4 final (2005/01/15)
 
@@ -180,7 +183,7 @@
   Zope 2.7.4 RC 2 (2005/01/07)
 
 Bugs fixed
-  
+
   - Collector #1407: fixed XML escaping problem introduced in 2.7.4 b1
 
   - moved Docutils back to lib/python/docutils
@@ -210,7 +213,7 @@
 
 Bugs fixed
 
-  - Collector #1617: fixed unchecked buffer accesses and unchecked 
+  - Collector #1617: fixed unchecked buffer accesses and unchecked
 Python API calls in cAccessControl.c (thanks to Tim Peters)
 
   Zope 2.7.4 beta 1 (2004/12/02)
@@ -228,7 +231,7 @@
 
   - The REQUEST now contains a new entry ACTUAL_URL which contains the
 full URL without query string as it appears within the location bar of
-the browser. The key has been added to provide a single key that is 
+the browser. The key has been added to provide a single key that is
 available for vhosted and non-vhosted installations.
 
   - Collector #1605: VHM did not quote URLs

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/Products/ZODBMountPoint - MountedObject.py:1.1.2.3

2005-05-20 Thread Tres Seaver
Update of /cvs-repository/Zope/lib/python/Products/ZODBMountPoint
In directory cvs.zope.org:/tmp/cvs-serv32014/lib/python/Products/ZODBMountPoint

Modified Files:
  Tag: Zope-2_7-branch
MountedObject.py 
Log Message:


  - Collector #1781: made 'create_mount_points' ZConfig option actually
work (thanks to Dieter Maurer for the patch).


=== Zope/lib/python/Products/ZODBMountPoint/MountedObject.py 1.1.2.2 = 1.1.2.3 
===
--- Zope/lib/python/Products/ZODBMountPoint/MountedObject.py:1.1.2.2Sat Dec 
20 11:58:07 2003
+++ Zope/lib/python/Products/ZODBMountPoint/MountedObject.pyFri May 20 
14:37:03 2005
@@ -115,7 +115,9 @@
 '''
 meta_type = 'ZODB Mount Point'
 _isMountedObject = 1
-_create_mount_points = 0
+# DM 2005-05-17: default value change necessary after fix of 
'_create_mount_point' handling
+#_create_mount_points = 0
+_create_mount_points = True
 
 icon = 'p_/broken'
 manage_options = ({'label':'Traceback', 'action':'manage_traceback'},)
@@ -165,7 +167,9 @@
 try:
 obj = root[real_root]
 except KeyError:
-if container_class or self._create_mount_points:
+# DM 2005-05-17: why should we require 'container_class'?
+#if container_class or self._create_mount_points:
+if self._create_mount_points:
 # Create a database automatically.
 from OFS.Application import Application
 obj = Application()
@@ -181,7 +185,10 @@
 try:
 obj = obj.unrestrictedTraverse(real_path)
 except (KeyError, AttributeError):
-if container_class or self._create_mount_points:
+# DM 2005-05-13: obviously, we do not want automatic
+#  construction when _create_mount_points is false
+#if container_class or self._create_mount_points:
+if container_class and self._create_mount_points:
 blazer = CustomTrailblazer(obj, container_class)
 obj = blazer.traverseOrConstruct(real_path)
 else:
@@ -270,7 +277,10 @@
 return res
 
 
-def manage_addMounts(dispatcher, paths=(), create_mount_points=0,
+# DM 2005-05-17: change default for 'create_mount_points' as
+#  otherwise (after our fix) 'temp_folder' can no longer be mounted
+#def manage_addMounts(dispatcher, paths=(), create_mount_points=0,
+def manage_addMounts(dispatcher, paths=(), create_mount_points=True,
  REQUEST=None):
 Adds MountedObjects at the requested paths.
 
@@ -293,7 +303,9 @@
 faux.id = mo.id
 faux.meta_type = loaded.meta_type
 container._setObject(faux.id, faux)
-del mo._create_mount_points
+# DM 2005-05-17: we want to keep our decision about automatic
+#  mount point creation
+#del mo._create_mount_points
 container._setOb(faux.id, mo)
 setMountPoint(container, faux.id, mo)
 count += 1

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins