summaryrefslogtreecommitdiff
path: root/flup/server/scgi_fork.py
diff options
context:
space:
mode:
Diffstat (limited to 'flup/server/scgi_fork.py')
-rw-r--r--flup/server/scgi_fork.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/flup/server/scgi_fork.py b/flup/server/scgi_fork.py
index 0ca81f6..cc63338 100644
--- a/flup/server/scgi_fork.py
+++ b/flup/server/scgi_fork.py
@@ -88,7 +88,8 @@ class WSGIServer(BaseSCGIServer, PreforkServer):
mind running in multiple processes, go use SWAP. ;)
"""
def __init__(self, application, scriptName='', environ=None,
- bindAddress=('localhost', 4000), allowedServers=None,
+ bindAddress=('localhost', 4000), umask=None,
+ allowedServers=None,
loggingLevel=logging.INFO, debug=True, **kw):
"""
scriptName is the initial portion of the URL path that "belongs"
@@ -99,11 +100,17 @@ class WSGIServer(BaseSCGIServer, PreforkServer):
environ, which must be a dictionary, can contain any additional
environment variables you want to pass to your application.
- bindAddress is the address to bind to, which must be a tuple of
- length 2. The first element is a string, which is the host name
- or IPv4 address of a local interface. The 2nd element is the port
- number.
-
+ bindAddress is the address to bind to, which must be a string or
+ a tuple of length 2. If a tuple, the first element must be a string,
+ which is the host name or IPv4 address of a local interface. The
+ 2nd element of the tuple is the port number. If a string, it will
+ be interpreted as a filename and a UNIX socket will be opened.
+
+ If binding to a UNIX socket, umask may be set to specify what
+ the umask is to be changed to before the socket is created in the
+ filesystem. After the socket is created, the previous umask is
+ restored.
+
allowedServers must be None or a list of strings representing the
IPv4 addresses of servers allowed to connect. None means accept
connections from anywhere.
@@ -116,6 +123,7 @@ class WSGIServer(BaseSCGIServer, PreforkServer):
multithreaded=False,
multiprocess=True,
bindAddress=bindAddress,
+ umask=umask,
allowedServers=allowedServers,
loggingLevel=loggingLevel,
debug=debug)