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 ...@@ -122,8 +122,8 @@ Zope Changes
Bugs fixed Bugs fixed
- Collector #1293: Added default ports for http-server, ftp-server - Collector #1293: missing 'address' parameters within one of the server
and webdav-server. sections raise an exception.
- Collector #1345: AcceleratedHTTPCacheManager now sends the - Collector #1345: AcceleratedHTTPCacheManager now sends the
Last-Modified header. Last-Modified header.
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<sectiontype name="http-server" <sectiontype name="http-server"
datatype=".HTTPServerFactory" datatype=".HTTPServerFactory"
implements="ZServer.server"> 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="force-connection-close" datatype="boolean" default="off"/>
<key name="webdav-source-clients"> <key name="webdav-source-clients">
<description> <description>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<sectiontype name="webdav-source-server" <sectiontype name="webdav-source-server"
datatype=".WebDAVSourceServerFactory" datatype=".WebDAVSourceServerFactory"
implements="ZServer.server"> 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"/> <key name="force-connection-close" datatype="boolean" default="off"/>
</sectiontype> </sectiontype>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<sectiontype name="ftp-server" <sectiontype name="ftp-server"
datatype=".FTPServerFactory" datatype=".FTPServerFactory"
implements="ZServer.server"> implements="ZServer.server">
<key name="address" datatype="inet-address" default="8021"/> <key name="address" datatype="inet-address"/>
</sectiontype> </sectiontype>
<sectiontype name="monitor-server" <sectiontype name="monitor-server"
......
...@@ -17,7 +17,7 @@ Each server type is represented by a ServerFactory instance. ...@@ -17,7 +17,7 @@ Each server type is represented by a ServerFactory instance.
""" """
import socket import socket
import ZConfig
_default_host_info = None _default_host_info = None
...@@ -81,6 +81,10 @@ class ServerFactory: ...@@ -81,6 +81,10 @@ class ServerFactory:
class HTTPServerFactory(ServerFactory): class HTTPServerFactory(ServerFactory):
def __init__(self, section): 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) ServerFactory.__init__(self, section.address)
self.force_connection_close = section.force_connection_close self.force_connection_close = section.force_connection_close
# webdav-source-server sections won't have webdav_source_clients: # webdav-source-server sections won't have webdav_source_clients:
...@@ -113,6 +117,9 @@ class WebDAVSourceServerFactory(HTTPServerFactory): ...@@ -113,6 +117,9 @@ class WebDAVSourceServerFactory(HTTPServerFactory):
class FTPServerFactory(ServerFactory): class FTPServerFactory(ServerFactory):
def __init__(self, section): 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) ServerFactory.__init__(self, section.address)
def create(self): 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