changeset 109:f6bffa4f537b

tweak for docs building with Sphinx
author Jon Nelson <jnelson@jamponi.net>
date Mon, 06 Jul 2009 11:21:26 -0500
parents 81ba1046b58f
children dfbc19c0e6bb
files flup/server/ajp.py flup/server/ajp_fork.py flup/server/fcgi_fork.py flup/server/scgi.py flup/server/scgi_fork.py
diffstat 5 files changed, 191 insertions(+), 161 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/flup/server/ajp.py	Fri Jun 12 16:07:45 2009 -0700
     1.2 +++ b/flup/server/ajp.py	Mon Jul 06 11:21:26 2009 -0500
     1.3 @@ -1,39 +1,45 @@
     1.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
     1.5 -# All rights reserved.
     1.6 -#
     1.7 -# Redistribution and use in source and binary forms, with or without
     1.8 -# modification, are permitted provided that the following conditions
     1.9 -# are met:
    1.10 -# 1. Redistributions of source code must retain the above copyright
    1.11 -#    notice, this list of conditions and the following disclaimer.
    1.12 -# 2. Redistributions in binary form must reproduce the above copyright
    1.13 -#    notice, this list of conditions and the following disclaimer in the
    1.14 -#    documentation and/or other materials provided with the distribution.
    1.15 -#
    1.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    1.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    1.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    1.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    1.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    1.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    1.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    1.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    1.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.26 -# SUCH DAMAGE.
    1.27 -#
    1.28 -# $Id$
    1.29 +"""
    1.30 +.. highlight:: python
    1.31 +   :linenothreshold: 5
    1.32  
    1.33 -"""
    1.34 +.. highlight:: bash
    1.35 +   :linenothreshold: 5
    1.36 +
    1.37  ajp - an AJP 1.3/WSGI gateway.
    1.38  
    1.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    1.40 +  All rights reserved.
    1.41 +:license:
    1.42 +
    1.43 + Redistribution and use in source and binary forms, with or without
    1.44 + modification, are permitted provided that the following conditions
    1.45 + are met:
    1.46 +
    1.47 + 1. Redistributions of source code must retain the above copyright
    1.48 +    notice, this list of conditions and the following disclaimer.
    1.49 + 2. Redistributions in binary form must reproduce the above copyright
    1.50 +    notice, this list of conditions and the following disclaimer in the
    1.51 +    documentation and/or other materials provided with the distribution.
    1.52 +
    1.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
    1.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    1.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    1.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    1.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    1.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    1.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    1.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    1.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.63 + SUCH DAMAGE.
    1.64 +
    1.65  For more information about AJP and AJP connectors for your web server, see
    1.66 -<http://jakarta.apache.org/tomcat/connectors-doc/>.
    1.67 +http://jakarta.apache.org/tomcat/connectors-doc/.
    1.68  
    1.69  For more information about the Web Server Gateway Interface, see
    1.70 -<http://www.python.org/peps/pep-0333.html>.
    1.71 +http://www.python.org/peps/pep-0333.html.
    1.72  
    1.73 -Example usage:
    1.74 +Example usage::
    1.75  
    1.76    #!/usr/bin/env python
    1.77    import sys
    1.78 @@ -50,7 +56,7 @@
    1.79  re-run. When a SIGINT or SIGTERM is received, the script exits with status
    1.80  code 0, possibly indicating a normal exit.
    1.81  
    1.82 -Example wrapper script:
    1.83 +Example wrapper script::
    1.84  
    1.85    #!/bin/sh
    1.86    STATUS=42
    1.87 @@ -59,14 +65,14 @@
    1.88      STATUS=$?
    1.89    done
    1.90  
    1.91 -Example workers.properties (for mod_jk):
    1.92 +Example workers.properties (for mod_jk)::
    1.93  
    1.94    worker.list=foo
    1.95    worker.foo.port=8009
    1.96    worker.foo.host=localhost
    1.97    worker.foo.type=ajp13
    1.98  
    1.99 -Example httpd.conf (for mod_jk):
   1.100 +Example httpd.conf (for mod_jk)::
   1.101  
   1.102    JkWorkersFile /path/to/workers.properties
   1.103    JkMount /* foo
   1.104 @@ -98,7 +104,7 @@
   1.105      implement. :)
   1.106  
   1.107      Of course you will need an AJP1.3 connector for your webserver (e.g.
   1.108 -    mod_jk) - see <http://jakarta.apache.org/tomcat/connectors-doc/>.
   1.109 +    mod_jk) - see http://jakarta.apache.org/tomcat/connectors-doc/.
   1.110      """
   1.111      def __init__(self, application, scriptName='', environ=None,
   1.112                   multithreaded=True, multiprocess=False,
     2.1 --- a/flup/server/ajp_fork.py	Fri Jun 12 16:07:45 2009 -0700
     2.2 +++ b/flup/server/ajp_fork.py	Mon Jul 06 11:21:26 2009 -0500
     2.3 @@ -1,37 +1,43 @@
     2.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
     2.5 -# All rights reserved.
     2.6 -#
     2.7 -# Redistribution and use in source and binary forms, with or without
     2.8 -# modification, are permitted provided that the following conditions
     2.9 -# are met:
    2.10 -# 1. Redistributions of source code must retain the above copyright
    2.11 -#    notice, this list of conditions and the following disclaimer.
    2.12 -# 2. Redistributions in binary form must reproduce the above copyright
    2.13 -#    notice, this list of conditions and the following disclaimer in the
    2.14 -#    documentation and/or other materials provided with the distribution.
    2.15 -#
    2.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    2.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    2.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    2.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    2.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    2.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    2.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    2.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    2.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    2.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.26 -# SUCH DAMAGE.
    2.27 -#
    2.28 -# $Id$
    2.29 +"""
    2.30 +.. highlight:: python
    2.31 +   :linenothreshold: 5
    2.32  
    2.33 -"""
    2.34 +.. highlight:: bash
    2.35 +   :linenothreshold: 5
    2.36 +
    2.37  ajp - an AJP 1.3/WSGI gateway.
    2.38  
    2.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    2.40 +  All rights reserved.
    2.41 +:license:
    2.42 +
    2.43 + Redistribution and use in source and binary forms, with or without
    2.44 + modification, are permitted provided that the following conditions
    2.45 + are met:
    2.46 +
    2.47 + 1. Redistributions of source code must retain the above copyright
    2.48 +    notice, this list of conditions and the following disclaimer.
    2.49 + 2. Redistributions in binary form must reproduce the above copyright
    2.50 +    notice, this list of conditions and the following disclaimer in the
    2.51 +    documentation and/or other materials provided with the distribution.
    2.52 +
    2.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
    2.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    2.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    2.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    2.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    2.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    2.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    2.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    2.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    2.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.63 + SUCH DAMAGE.
    2.64 +
    2.65  For more information about AJP and AJP connectors for your web server, see
    2.66 -<http://jakarta.apache.org/tomcat/connectors-doc/>.
    2.67 +http://jakarta.apache.org/tomcat/connectors-doc/.
    2.68  
    2.69  For more information about the Web Server Gateway Interface, see
    2.70 -<http://www.python.org/peps/pep-0333.html>.
    2.71 +http://www.python.org/peps/pep-0333.html.
    2.72  
    2.73  Example usage:
    2.74  
    2.75 @@ -50,7 +56,7 @@
    2.76  re-run. When a SIGINT or SIGTERM is received, the script exits with status
    2.77  code 0, possibly indicating a normal exit.
    2.78  
    2.79 -Example wrapper script:
    2.80 +Example wrapper script::
    2.81  
    2.82    #!/bin/sh
    2.83    STATUS=42
    2.84 @@ -59,14 +65,14 @@
    2.85      STATUS=$?
    2.86    done
    2.87  
    2.88 -Example workers.properties (for mod_jk):
    2.89 +Example workers.properties (for mod_jk)::
    2.90  
    2.91    worker.list=foo
    2.92    worker.foo.port=8009
    2.93    worker.foo.host=localhost
    2.94    worker.foo.type=ajp13
    2.95  
    2.96 -Example httpd.conf (for mod_jk):
    2.97 +Example httpd.conf (for mod_jk)::
    2.98  
    2.99    JkWorkersFile /path/to/workers.properties
   2.100    JkMount /* foo
   2.101 @@ -98,7 +104,7 @@
   2.102      implement. :)
   2.103  
   2.104      Of course you will need an AJP1.3 connector for your webserver (e.g.
   2.105 -    mod_jk) - see <http://jakarta.apache.org/tomcat/connectors-doc/>.
   2.106 +    mod_jk) - see http://jakarta.apache.org/tomcat/connectors-doc/.
   2.107      """
   2.108      def __init__(self, application, scriptName='', environ=None,
   2.109                   bindAddress=('localhost', 8009), allowedServers=None,
     3.1 --- a/flup/server/fcgi_fork.py	Fri Jun 12 16:07:45 2009 -0700
     3.2 +++ b/flup/server/fcgi_fork.py	Mon Jul 06 11:21:26 2009 -0500
     3.3 @@ -1,38 +1,44 @@
     3.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
     3.5 -# All rights reserved.
     3.6 -#
     3.7 -# Redistribution and use in source and binary forms, with or without
     3.8 -# modification, are permitted provided that the following conditions
     3.9 -# are met:
    3.10 -# 1. Redistributions of source code must retain the above copyright
    3.11 -#    notice, this list of conditions and the following disclaimer.
    3.12 -# 2. Redistributions in binary form must reproduce the above copyright
    3.13 -#    notice, this list of conditions and the following disclaimer in the
    3.14 -#    documentation and/or other materials provided with the distribution.
    3.15 -#
    3.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    3.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    3.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    3.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    3.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    3.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    3.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    3.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    3.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    3.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    3.26 -# SUCH DAMAGE.
    3.27 -#
    3.28 -# $Id$
    3.29 +"""
    3.30 +.. highlight:: python
    3.31 +   :linenothreshold: 5
    3.32  
    3.33 -"""
    3.34 +.. highlight:: bash
    3.35 +   :linenothreshold: 5
    3.36 +
    3.37  fcgi - a FastCGI/WSGI gateway.
    3.38  
    3.39 -For more information about FastCGI, see <http://www.fastcgi.com/>.
    3.40 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    3.41 +  All rights reserved.
    3.42 +:license:
    3.43 +
    3.44 + Redistribution and use in source and binary forms, with or without
    3.45 + modification, are permitted provided that the following conditions
    3.46 + are met:
    3.47 +
    3.48 + 1. Redistributions of source code must retain the above copyright
    3.49 +    notice, this list of conditions and the following disclaimer.
    3.50 + 2. Redistributions in binary form must reproduce the above copyright
    3.51 +    notice, this list of conditions and the following disclaimer in the
    3.52 +    documentation and/or other materials provided with the distribution.
    3.53 +
    3.54 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
    3.55 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    3.56 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    3.57 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    3.58 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    3.59 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    3.60 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    3.61 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    3.62 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    3.63 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    3.64 + SUCH DAMAGE.
    3.65 +
    3.66 +For more information about FastCGI, see http://www.fastcgi.com/.
    3.67  
    3.68  For more information about the Web Server Gateway Interface, see
    3.69 -<http://www.python.org/peps/pep-0333.html>.
    3.70 +http://www.python.org/peps/pep-0333.html.
    3.71  
    3.72 -Example usage:
    3.73 +Example usage::
    3.74  
    3.75    #!/usr/bin/env python
    3.76    from myapplication import app # Assume app is your WSGI application object
    3.77 @@ -60,7 +66,7 @@
    3.78  class WSGIServer(BaseFCGIServer, PreforkServer):
    3.79      """
    3.80      FastCGI server that supports the Web Server Gateway Interface. See
    3.81 -    <http://www.python.org/peps/pep-0333.html>.
    3.82 +    http://www.python.org/peps/pep-0333.html.
    3.83      """
    3.84      def __init__(self, application, environ=None,
    3.85                   bindAddress=None, umask=None, multiplexed=False,
     4.1 --- a/flup/server/scgi.py	Fri Jun 12 16:07:45 2009 -0700
     4.2 +++ b/flup/server/scgi.py	Mon Jul 06 11:21:26 2009 -0500
     4.3 @@ -1,39 +1,45 @@
     4.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
     4.5 -# All rights reserved.
     4.6 -#
     4.7 -# Redistribution and use in source and binary forms, with or without
     4.8 -# modification, are permitted provided that the following conditions
     4.9 -# are met:
    4.10 -# 1. Redistributions of source code must retain the above copyright
    4.11 -#    notice, this list of conditions and the following disclaimer.
    4.12 -# 2. Redistributions in binary form must reproduce the above copyright
    4.13 -#    notice, this list of conditions and the following disclaimer in the
    4.14 -#    documentation and/or other materials provided with the distribution.
    4.15 -#
    4.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    4.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    4.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    4.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    4.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    4.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    4.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    4.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    4.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    4.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    4.26 -# SUCH DAMAGE.
    4.27 -#
    4.28 -# $Id$
    4.29 +"""
    4.30 +.. highlight:: python
    4.31 +   :linenothreshold: 5
    4.32  
    4.33 -"""
    4.34 +.. highlight:: bash
    4.35 +   :linenothreshold: 5
    4.36 +
    4.37  scgi - an SCGI/WSGI gateway.
    4.38  
    4.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    4.40 +  All rights reserved.
    4.41 +:license:
    4.42 +
    4.43 + Redistribution and use in source and binary forms, with or without
    4.44 + modification, are permitted provided that the following conditions
    4.45 + are met:
    4.46 +
    4.47 + 1. Redistributions of source code must retain the above copyright
    4.48 +    notice, this list of conditions and the following disclaimer.
    4.49 + 2. Redistributions in binary form must reproduce the above copyright
    4.50 +    notice, this list of conditions and the following disclaimer in the
    4.51 +    documentation and/or other materials provided with the distribution.
    4.52 +
    4.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
    4.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    4.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    4.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    4.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    4.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    4.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    4.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    4.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    4.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    4.63 + SUCH DAMAGE.
    4.64 +
    4.65  For more information about SCGI and mod_scgi for Apache1/Apache2, see
    4.66 -<http://www.mems-exchange.org/software/scgi/>.
    4.67 +http://www.mems-exchange.org/software/scgi/.
    4.68  
    4.69  For more information about the Web Server Gateway Interface, see
    4.70 -<http://www.python.org/peps/pep-0333.html>.
    4.71 +http://www.python.org/peps/pep-0333.html.
    4.72  
    4.73 -Example usage:
    4.74 +Example usage::
    4.75  
    4.76    #!/usr/bin/env python
    4.77    import sys
    4.78 @@ -50,7 +56,7 @@
    4.79  re-run. When a SIGINT or SIGTERM is received, the script exits with status
    4.80  code 0, possibly indicating a normal exit.
    4.81  
    4.82 -Example wrapper script:
    4.83 +Example wrapper script::
    4.84  
    4.85    #!/bin/sh
    4.86    STATUS=42
    4.87 @@ -75,9 +81,9 @@
    4.88  class WSGIServer(BaseSCGIServer, ThreadedServer):
    4.89      """
    4.90      SCGI/WSGI server. For information about SCGI (Simple Common Gateway
    4.91 -    Interface), see <http://www.mems-exchange.org/software/scgi/>.
    4.92 +    Interface), see http://www.mems-exchange.org/software/scgi/.
    4.93  
    4.94 -    This server is similar to SWAP <http://www.idyll.org/~t/www-tools/wsgi/>,
    4.95 +    This server is similar to SWAP http://www.idyll.org/~t/www-tools/wsgi/,
    4.96      another SCGI/WSGI server.
    4.97  
    4.98      It differs from SWAP in that it isn't based on scgi.scgi_server and
    4.99 @@ -112,7 +118,7 @@
   4.100          the umask is to be changed to before the socket is created in the
   4.101          filesystem. After the socket is created, the previous umask is
   4.102          restored.
   4.103 -        
   4.104 +
   4.105          allowedServers must be None or a list of strings representing the
   4.106          IPv4 addresses of servers allowed to connect. None means accept
   4.107          connections from anywhere.
     5.1 --- a/flup/server/scgi_fork.py	Fri Jun 12 16:07:45 2009 -0700
     5.2 +++ b/flup/server/scgi_fork.py	Mon Jul 06 11:21:26 2009 -0500
     5.3 @@ -1,39 +1,45 @@
     5.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
     5.5 -# All rights reserved.
     5.6 -#
     5.7 -# Redistribution and use in source and binary forms, with or without
     5.8 -# modification, are permitted provided that the following conditions
     5.9 -# are met:
    5.10 -# 1. Redistributions of source code must retain the above copyright
    5.11 -#    notice, this list of conditions and the following disclaimer.
    5.12 -# 2. Redistributions in binary form must reproduce the above copyright
    5.13 -#    notice, this list of conditions and the following disclaimer in the
    5.14 -#    documentation and/or other materials provided with the distribution.
    5.15 -#
    5.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    5.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    5.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    5.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    5.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    5.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    5.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    5.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    5.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    5.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    5.26 -# SUCH DAMAGE.
    5.27 -#
    5.28 -# $Id$
    5.29 +"""
    5.30 +.. highlight:: python
    5.31 +   :linenothreshold: 5
    5.32  
    5.33 -"""
    5.34 +.. highlight:: bash
    5.35 +   :linenothreshold: 5
    5.36 +
    5.37  scgi - an SCGI/WSGI gateway.
    5.38  
    5.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    5.40 +  All rights reserved.
    5.41 +:license:
    5.42 +
    5.43 + Redistribution and use in source and binary forms, with or without
    5.44 + modification, are permitted provided that the following conditions
    5.45 + are met:
    5.46 +
    5.47 + 1. Redistributions of source code must retain the above copyright
    5.48 +    notice, this list of conditions and the following disclaimer.
    5.49 + 2. Redistributions in binary form must reproduce the above copyright
    5.50 +    notice, this list of conditions and the following disclaimer in the
    5.51 +    documentation and/or other materials provided with the distribution.
    5.52 +
    5.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
    5.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    5.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    5.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    5.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    5.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    5.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    5.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    5.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    5.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    5.63 + SUCH DAMAGE.
    5.64 +
    5.65  For more information about SCGI and mod_scgi for Apache1/Apache2, see
    5.66 -<http://www.mems-exchange.org/software/scgi/>.
    5.67 +http://www.mems-exchange.org/software/scgi/.
    5.68  
    5.69  For more information about the Web Server Gateway Interface, see
    5.70 -<http://www.python.org/peps/pep-0333.html>.
    5.71 +http://www.python.org/peps/pep-0333.html.
    5.72  
    5.73 -Example usage:
    5.74 +Example usage::
    5.75  
    5.76    #!/usr/bin/env python
    5.77    import sys
    5.78 @@ -50,7 +56,7 @@
    5.79  re-run. When a SIGINT or SIGTERM is received, the script exits with status
    5.80  code 0, possibly indicating a normal exit.
    5.81  
    5.82 -Example wrapper script:
    5.83 +Example wrapper script::
    5.84  
    5.85    #!/bin/sh
    5.86    STATUS=42
    5.87 @@ -75,9 +81,9 @@
    5.88  class WSGIServer(BaseSCGIServer, PreforkServer):
    5.89      """
    5.90      SCGI/WSGI server. For information about SCGI (Simple Common Gateway
    5.91 -    Interface), see <http://www.mems-exchange.org/software/scgi/>.
    5.92 +    Interface), see http://www.mems-exchange.org/software/scgi/.
    5.93  
    5.94 -    This server is similar to SWAP <http://www.idyll.org/~t/www-tools/wsgi/>,
    5.95 +    This server is similar to SWAP http://www.idyll.org/~t/www-tools/wsgi/,
    5.96      another SCGI/WSGI server.
    5.97  
    5.98      It differs from SWAP in that it isn't based on scgi.scgi_server and
    5.99 @@ -111,7 +117,7 @@
   5.100          the umask is to be changed to before the socket is created in the
   5.101          filesystem. After the socket is created, the previous umask is
   5.102          restored.
   5.103 -        
   5.104 +
   5.105          allowedServers must be None or a list of strings representing the
   5.106          IPv4 addresses of servers allowed to connect. None means accept
   5.107          connections from anywhere.