Commit 73c21afd authored by Andreas Jung's avatar Andreas Jung

- Collector #1293: missing 'address' parameters within one of the server

       sections raises an exception. 
parent b120462a
......@@ -122,8 +122,8 @@ Zope Changes
Bugs fixed
- Collector #1293: Added default ports for http-server, ftp-server
and webdav-server.
- Collector #1293: missing 'address' parameters within one of the server
sections raise an exception.
- Collector #1345: AcceleratedHTTPCacheManager now sends the
Last-Modified header.
......
......@@ -11,7 +11,7 @@
<sectiontype name="http-server"
datatype=".HTTPServerFactory"
implements="ZServer.server">
<key name="address" datatype="inet-address" default="8080"/>
<key name="address" datatype="inet-address"/>
<key name="force-connection-close" datatype="boolean" default="off"/>
<key name="webdav-source-clients">
<description>
......@@ -24,7 +24,7 @@
<sectiontype name="webdav-source-server"
datatype=".WebDAVSourceServerFactory"
implements="ZServer.server">
<key name="address" datatype="inet-address" default="9080"/>
<key name="address" datatype="inet-address"/>
<key name="force-connection-close" datatype="boolean" default="off"/>
</sectiontype>
......@@ -43,7 +43,7 @@
<sectiontype name="ftp-server"
datatype=".FTPServerFactory"
implements="ZServer.server">
<key name="address" datatype="inet-address" default="8021"/>
<key name="address" datatype="inet-address"/>
</sectiontype>
<sectiontype name="monitor-server"
......
......@@ -17,7 +17,7 @@ Each server type is represented by a ServerFactory instance.
"""
import socket
import ZConfig
_default_host_info = None
......@@ -81,6 +81,10 @@ class ServerFactory:
class HTTPServerFactory(ServerFactory):
def __init__(self, section):
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.force_connection_close = section.force_connection_close
# webdav-source-server sections won't have webdav_source_clients:
......@@ -113,6 +117,9 @@ class WebDAVSourceServerFactory(HTTPServerFactory):
class FTPServerFactory(ServerFactory):
def __init__(self, section):
if not section.address:
raise ZConfig.ConfigurationError(
"No 'address' settings found within the 'ftp-server' section")
ServerFactory.__init__(self, section.address)
def create(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment