changeset 112:50e45ce58629

Merged flup repo up to 97:9720ce76a209
author Velko Ivanov <vivanov@ivanov-nest.com>
date Mon, 31 Oct 2011 14:51:28 +0200
parents ddcbf3af11f1 9720ce76a209
children 9eecf1c4e416
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 25 files changed, 633 insertions(+), 162 deletions(-) [+]
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/Makefile	Mon Oct 31 14:51:28 2011 +0200
     1.3 @@ -0,0 +1,88 @@
     1.4 +# Makefile for Sphinx documentation
     1.5 +#
     1.6 +
     1.7 +# You can set these variables from the command line.
     1.8 +SPHINXOPTS    =
     1.9 +SPHINXBUILD   = sphinx-build
    1.10 +PAPER         =
    1.11 +
    1.12 +# Internal variables.
    1.13 +PAPEROPT_a4     = -D latex_paper_size=a4
    1.14 +PAPEROPT_letter = -D latex_paper_size=letter
    1.15 +ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
    1.16 +
    1.17 +.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
    1.18 +
    1.19 +help:
    1.20 +	@echo "Please use \`make <target>' where <target> is one of"
    1.21 +	@echo "  html      to make standalone HTML files"
    1.22 +	@echo "  dirhtml   to make HTML files named index.html in directories"
    1.23 +	@echo "  pickle    to make pickle files"
    1.24 +	@echo "  json      to make JSON files"
    1.25 +	@echo "  htmlhelp  to make HTML files and a HTML help project"
    1.26 +	@echo "  qthelp    to make HTML files and a qthelp project"
    1.27 +	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
    1.28 +	@echo "  changes   to make an overview of all changed/added/deprecated items"
    1.29 +	@echo "  linkcheck to check all external links for integrity"
    1.30 +	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
    1.31 +
    1.32 +clean:
    1.33 +	-rm -rf build/*
    1.34 +
    1.35 +html:
    1.36 +	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
    1.37 +	@echo
    1.38 +	@echo "Build finished. The HTML pages are in build/html."
    1.39 +
    1.40 +dirhtml:
    1.41 +	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) build/dirhtml
    1.42 +	@echo
    1.43 +	@echo "Build finished. The HTML pages are in build/dirhtml."
    1.44 +
    1.45 +pickle:
    1.46 +	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
    1.47 +	@echo
    1.48 +	@echo "Build finished; now you can process the pickle files."
    1.49 +
    1.50 +json:
    1.51 +	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
    1.52 +	@echo
    1.53 +	@echo "Build finished; now you can process the JSON files."
    1.54 +
    1.55 +htmlhelp:
    1.56 +	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
    1.57 +	@echo
    1.58 +	@echo "Build finished; now you can run HTML Help Workshop with the" \
    1.59 +	      ".hhp project file in build/htmlhelp."
    1.60 +
    1.61 +qthelp:
    1.62 +	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
    1.63 +	@echo
    1.64 +	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
    1.65 +	      ".qhcp project file in build/qthelp, like this:"
    1.66 +	@echo "# qcollectiongenerator build/qthelp/flup.qhcp"
    1.67 +	@echo "To view the help file:"
    1.68 +	@echo "# assistant -collectionFile build/qthelp/flup.qhc"
    1.69 +
    1.70 +latex:
    1.71 +	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
    1.72 +	@echo
    1.73 +	@echo "Build finished; the LaTeX files are in build/latex."
    1.74 +	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
    1.75 +	      "run these through (pdf)latex."
    1.76 +
    1.77 +changes:
    1.78 +	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
    1.79 +	@echo
    1.80 +	@echo "The overview file is in build/changes."
    1.81 +
    1.82 +linkcheck:
    1.83 +	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
    1.84 +	@echo
    1.85 +	@echo "Link check complete; look for any errors in the above output " \
    1.86 +	      "or in build/linkcheck/output.txt."
    1.87 +
    1.88 +doctest:
    1.89 +	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) build/doctest
    1.90 +	@echo "Testing of doctests in the sources finished, look at the " \
    1.91 +	      "results in build/doctest/output.txt."
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/docs/source/conf.py	Mon Oct 31 14:51:28 2011 +0200
     2.3 @@ -0,0 +1,195 @@
     2.4 +# -*- coding: utf-8 -*-
     2.5 +#
     2.6 +# flup documentation build configuration file, created by
     2.7 +# sphinx-quickstart on Mon Jul  6 10:53:43 2009.
     2.8 +#
     2.9 +# This file is execfile()d with the current directory set to its containing dir.
    2.10 +#
    2.11 +# Note that not all possible configuration values are present in this
    2.12 +# autogenerated file.
    2.13 +#
    2.14 +# All configuration values have a default; values that are commented out
    2.15 +# serve to show the default.
    2.16 +
    2.17 +import sys, os
    2.18 +
    2.19 +# If extensions (or modules to document with autodoc) are in another directory,
    2.20 +# add these directories to sys.path here. If the directory is relative to the
    2.21 +# documentation root, use os.path.abspath to make it absolute, like shown here.
    2.22 +#sys.path.append(os.path.abspath('.'))
    2.23 +sys.path.insert(0, (os.path.abspath('../..')))
    2.24 +
    2.25 +# -- General configuration -----------------------------------------------------
    2.26 +
    2.27 +# Add any Sphinx extension module names here, as strings. They can be extensions
    2.28 +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
    2.29 +extensions = ['sphinx.ext.autodoc']
    2.30 +
    2.31 +# Add any paths that contain templates here, relative to this directory.
    2.32 +templates_path = ['_templates']
    2.33 +
    2.34 +# The suffix of source filenames.
    2.35 +source_suffix = '.rst'
    2.36 +
    2.37 +# The encoding of source files.
    2.38 +#source_encoding = 'utf-8'
    2.39 +
    2.40 +# The master toctree document.
    2.41 +master_doc = 'index'
    2.42 +
    2.43 +# General information about the project.
    2.44 +project = u'flup'
    2.45 +copyright = u'2009, Allan Saddi'
    2.46 +
    2.47 +# The version info for the project you're documenting, acts as replacement for
    2.48 +# |version| and |release|, also used in various other places throughout the
    2.49 +# built documents.
    2.50 +#
    2.51 +# The short X.Y version.
    2.52 +version = '1.0.2'
    2.53 +# The full version, including alpha/beta/rc tags.
    2.54 +release = '1.0.2'
    2.55 +
    2.56 +# The language for content autogenerated by Sphinx. Refer to documentation
    2.57 +# for a list of supported languages.
    2.58 +#language = None
    2.59 +
    2.60 +# There are two options for replacing |today|: either, you set today to some
    2.61 +# non-false value, then it is used:
    2.62 +#today = ''
    2.63 +# Else, today_fmt is used as the format for a strftime call.
    2.64 +#today_fmt = '%B %d, %Y'
    2.65 +
    2.66 +# List of documents that shouldn't be included in the build.
    2.67 +#unused_docs = []
    2.68 +
    2.69 +# List of directories, relative to source directory, that shouldn't be searched
    2.70 +# for source files.
    2.71 +exclude_trees = []
    2.72 +
    2.73 +# The reST default role (used for this markup: `text`) to use for all documents.
    2.74 +#default_role = None
    2.75 +
    2.76 +# If true, '()' will be appended to :func: etc. cross-reference text.
    2.77 +#add_function_parentheses = True
    2.78 +
    2.79 +# If true, the current module name will be prepended to all description
    2.80 +# unit titles (such as .. function::).
    2.81 +#add_module_names = True
    2.82 +
    2.83 +# If true, sectionauthor and moduleauthor directives will be shown in the
    2.84 +# output. They are ignored by default.
    2.85 +#show_authors = False
    2.86 +
    2.87 +# The name of the Pygments (syntax highlighting) style to use.
    2.88 +pygments_style = 'sphinx'
    2.89 +
    2.90 +# A list of ignored prefixes for module index sorting.
    2.91 +#modindex_common_prefix = []
    2.92 +
    2.93 +
    2.94 +# -- Options for HTML output ---------------------------------------------------
    2.95 +
    2.96 +# The theme to use for HTML and HTML Help pages.  Major themes that come with
    2.97 +# Sphinx are currently 'default' and 'sphinxdoc'.
    2.98 +html_theme = 'default'
    2.99 +
   2.100 +# Theme options are theme-specific and customize the look and feel of a theme
   2.101 +# further.  For a list of options available for each theme, see the
   2.102 +# documentation.
   2.103 +#html_theme_options = {}
   2.104 +
   2.105 +# Add any paths that contain custom themes here, relative to this directory.
   2.106 +#html_theme_path = []
   2.107 +
   2.108 +# The name for this set of Sphinx documents.  If None, it defaults to
   2.109 +# "<project> v<release> documentation".
   2.110 +#html_title = None
   2.111 +
   2.112 +# A shorter title for the navigation bar.  Default is the same as html_title.
   2.113 +#html_short_title = None
   2.114 +
   2.115 +# The name of an image file (relative to this directory) to place at the top
   2.116 +# of the sidebar.
   2.117 +#html_logo = None
   2.118 +
   2.119 +# The name of an image file (within the static path) to use as favicon of the
   2.120 +# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
   2.121 +# pixels large.
   2.122 +#html_favicon = None
   2.123 +
   2.124 +# Add any paths that contain custom static files (such as style sheets) here,
   2.125 +# relative to this directory. They are copied after the builtin static files,
   2.126 +# so a file named "default.css" will overwrite the builtin "default.css".
   2.127 +html_static_path = ['_static']
   2.128 +
   2.129 +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
   2.130 +# using the given strftime format.
   2.131 +#html_last_updated_fmt = '%b %d, %Y'
   2.132 +
   2.133 +# If true, SmartyPants will be used to convert quotes and dashes to
   2.134 +# typographically correct entities.
   2.135 +#html_use_smartypants = True
   2.136 +
   2.137 +# Custom sidebar templates, maps document names to template names.
   2.138 +#html_sidebars = {}
   2.139 +
   2.140 +# Additional templates that should be rendered to pages, maps page names to
   2.141 +# template names.
   2.142 +#html_additional_pages = {}
   2.143 +
   2.144 +# If false, no module index is generated.
   2.145 +#html_use_modindex = True
   2.146 +
   2.147 +# If false, no index is generated.
   2.148 +#html_use_index = True
   2.149 +
   2.150 +# If true, the index is split into individual pages for each letter.
   2.151 +#html_split_index = False
   2.152 +
   2.153 +# If true, links to the reST sources are added to the pages.
   2.154 +#html_show_sourcelink = True
   2.155 +
   2.156 +# If true, an OpenSearch description file will be output, and all pages will
   2.157 +# contain a <link> tag referring to it.  The value of this option must be the
   2.158 +# base URL from which the finished HTML is served.
   2.159 +#html_use_opensearch = ''
   2.160 +
   2.161 +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
   2.162 +#html_file_suffix = ''
   2.163 +
   2.164 +# Output file base name for HTML help builder.
   2.165 +htmlhelp_basename = 'flupdoc'
   2.166 +
   2.167 +
   2.168 +# -- Options for LaTeX output --------------------------------------------------
   2.169 +
   2.170 +# The paper size ('letter' or 'a4').
   2.171 +#latex_paper_size = 'letter'
   2.172 +
   2.173 +# The font size ('10pt', '11pt' or '12pt').
   2.174 +#latex_font_size = '10pt'
   2.175 +
   2.176 +# Grouping the document tree into LaTeX files. List of tuples
   2.177 +# (source start file, target name, title, author, documentclass [howto/manual]).
   2.178 +latex_documents = [
   2.179 +  ('index', 'flup.tex', u'flup Documentation',
   2.180 +   u'Allan Saddi', 'manual'),
   2.181 +]
   2.182 +
   2.183 +# The name of an image file (relative to this directory) to place at the top of
   2.184 +# the title page.
   2.185 +#latex_logo = None
   2.186 +
   2.187 +# For "manual" documents, if this is true, then toplevel headings are parts,
   2.188 +# not chapters.
   2.189 +#latex_use_parts = False
   2.190 +
   2.191 +# Additional stuff for the LaTeX preamble.
   2.192 +#latex_preamble = ''
   2.193 +
   2.194 +# Documents to append as an appendix to all manuals.
   2.195 +#latex_appendices = []
   2.196 +
   2.197 +# If false, no module index is generated.
   2.198 +#latex_use_modindex = True
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/docs/source/index.rst	Mon Oct 31 14:51:28 2011 +0200
     3.3 @@ -0,0 +1,37 @@
     3.4 +Welcome to flup's documentation!
     3.5 +================================
     3.6 +
     3.7 +Contents:
     3.8 +
     3.9 +.. toctree::
    3.10 +   :maxdepth: 2
    3.11 +
    3.12 +   modules/flup.server.ajp_base
    3.13 +   modules/flup.server.ajp
    3.14 +   modules/flup.server.ajp_fork
    3.15 +   modules/flup.server.cgi
    3.16 +   modules/flup.server.fcgi_base
    3.17 +   modules/flup.server.fcgi
    3.18 +   modules/flup.server.fcgi_fork
    3.19 +   modules/flup.server.fcgi_single
    3.20 +   modules/flup.server.scgi_base
    3.21 +   modules/flup.server.scgi
    3.22 +   modules/flup.server.scgi_fork
    3.23 +   modules/flup.server.paste_factory
    3.24 +   modules/flup.server.threadedserver
    3.25 +   modules/flup.server.threadpool
    3.26 +   modules/flup.server.preforkserver
    3.27 +   modules/flup.server.singleserver
    3.28 +
    3.29 +
    3.30 +Modules
    3.31 +=======
    3.32 +
    3.33 +
    3.34 +Indices and tables
    3.35 +==================
    3.36 +
    3.37 +* :ref:`genindex`
    3.38 +* :ref:`modindex`
    3.39 +* :ref:`search`
    3.40 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/docs/source/modules/flup.server.ajp.rst	Mon Oct 31 14:51:28 2011 +0200
     4.3 @@ -0,0 +1,8 @@
     4.4 +:mod:`flup.server.ajp` - ajp - an AJP 1.3/WSGI gateway (threaded)
     4.5 +=================================================================
     4.6 +
     4.7 +.. automodule:: flup.server.ajp
     4.8 +   :members:
     4.9 +   :undoc-members:
    4.10 +   :inherited-members:
    4.11 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/docs/source/modules/flup.server.ajp_base.rst	Mon Oct 31 14:51:28 2011 +0200
     5.3 @@ -0,0 +1,7 @@
     5.4 +:mod:`flup.server.ajp_base` - ajp - an AJP 1.3/WSGI gateway
     5.5 +===========================================================
     5.6 +
     5.7 +.. automodule:: flup.server.ajp_base
     5.8 +   :members:
     5.9 +   :undoc-members:
    5.10 +   :inherited-members:
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/docs/source/modules/flup.server.ajp_fork.rst	Mon Oct 31 14:51:28 2011 +0200
     6.3 @@ -0,0 +1,7 @@
     6.4 +:mod:`flup.server.ajp_fork` - ajp - an AJP 1.3/WSGI gateway (forking)
     6.5 +=====================================================================
     6.6 +
     6.7 +.. automodule:: flup.server.ajp_fork
     6.8 +   :members:
     6.9 +   :undoc-members:
    6.10 +   :inherited-members:
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/docs/source/modules/flup.server.cgi.rst	Mon Oct 31 14:51:28 2011 +0200
     7.3 @@ -0,0 +1,7 @@
     7.4 +:mod:`flup.server.cgi`
     7.5 +======================
     7.6 +
     7.7 +.. automodule:: flup.server.cgi
     7.8 +   :members:
     7.9 +   :undoc-members:
    7.10 +   :inherited-members:
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/docs/source/modules/flup.server.fcgi.rst	Mon Oct 31 14:51:28 2011 +0200
     8.3 @@ -0,0 +1,7 @@
     8.4 +:mod:`flup.server.fcgi` - fcgi - a FastCGI/WSGI gateway (threaded)
     8.5 +==================================================================
     8.6 +
     8.7 +.. automodule:: flup.server.fcgi
     8.8 +   :members:
     8.9 +   :undoc-members:
    8.10 +   :inherited-members:
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/docs/source/modules/flup.server.fcgi_base.rst	Mon Oct 31 14:51:28 2011 +0200
     9.3 @@ -0,0 +1,7 @@
     9.4 +:mod:`flup.server.fcgi_base` - fcgi - a FastCGI/WSGI gateway
     9.5 +============================================================
     9.6 +
     9.7 +.. automodule:: flup.server.fcgi_base
     9.8 +   :members:
     9.9 +   :undoc-members:
    9.10 +   :inherited-members:
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/docs/source/modules/flup.server.fcgi_fork.rst	Mon Oct 31 14:51:28 2011 +0200
    10.3 @@ -0,0 +1,7 @@
    10.4 +:mod:`flup.server.fcgi_fork` - fcgi - a FastCGI/WSGI gateway (forking)
    10.5 +======================================================================
    10.6 +
    10.7 +.. automodule:: flup.server.fcgi_fork
    10.8 +   :members:
    10.9 +   :undoc-members:
   10.10 +   :inherited-members:
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/docs/source/modules/flup.server.fcgi_single.rst	Mon Oct 31 14:51:28 2011 +0200
    11.3 @@ -0,0 +1,7 @@
    11.4 +:mod:`flup.server.fcgi_single` - fcgi - a FastCGI/WSGI gateway (single-threaded)
    11.5 +================================================================================
    11.6 +
    11.7 +.. automodule:: flup.server.fcgi_single
    11.8 +   :members:
    11.9 +   :undoc-members:
   11.10 +   :inherited-members:
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/docs/source/modules/flup.server.paste_factory.rst	Mon Oct 31 14:51:28 2011 +0200
    12.3 @@ -0,0 +1,8 @@
    12.4 +:mod:`flup.server.paste_factory`
    12.5 +================================
    12.6 +
    12.7 +.. automodule:: flup.server.paste_factory
    12.8 +   :members:
    12.9 +   :undoc-members:
   12.10 +   :inherited-members:
   12.11 +
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/docs/source/modules/flup.server.preforkserver.rst	Mon Oct 31 14:51:28 2011 +0200
    13.3 @@ -0,0 +1,9 @@
    13.4 +:mod:`flup.server.preforkserver`
    13.5 +================================
    13.6 +
    13.7 +.. automodule:: flup.server.preforkserver
    13.8 +   :members:
    13.9 +   :undoc-members:
   13.10 +   :inherited-members:
   13.11 +
   13.12 +
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/docs/source/modules/flup.server.scgi.rst	Mon Oct 31 14:51:28 2011 +0200
    14.3 @@ -0,0 +1,7 @@
    14.4 +:mod:`flup.server.scgi` - scgi - an SCGI/WSGI gateway (threaded)
    14.5 +================================================================
    14.6 +
    14.7 +.. automodule:: flup.server.scgi
    14.8 +   :members:
    14.9 +   :undoc-members:
   14.10 +   :inherited-members:
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/docs/source/modules/flup.server.scgi_base.rst	Mon Oct 31 14:51:28 2011 +0200
    15.3 @@ -0,0 +1,7 @@
    15.4 +:mod:`flup.server.scgi_base` - scgi - an SCGI/WSGI gateway
    15.5 +==========================================================
    15.6 +
    15.7 +.. automodule:: flup.server.scgi_base
    15.8 +   :members:
    15.9 +   :undoc-members:
   15.10 +   :inherited-members:
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/docs/source/modules/flup.server.scgi_fork.rst	Mon Oct 31 14:51:28 2011 +0200
    16.3 @@ -0,0 +1,7 @@
    16.4 +:mod:`flup.server.scgi_fork` - scgi - an SCGI/WSGI gateway (forking)
    16.5 +====================================================================
    16.6 +
    16.7 +.. automodule:: flup.server.scgi_fork
    16.8 +   :members:
    16.9 +   :undoc-members:
   16.10 +   :inherited-members:
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/docs/source/modules/flup.server.singleserver.rst	Mon Oct 31 14:51:28 2011 +0200
    17.3 @@ -0,0 +1,9 @@
    17.4 +:mod:`flup.server.singleserver`
    17.5 +===============================
    17.6 +
    17.7 +.. automodule:: flup.server.singleserver
    17.8 +   :members:
    17.9 +   :undoc-members:
   17.10 +   :inherited-members:
   17.11 +
   17.12 +
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/docs/source/modules/flup.server.threadedserver.rst	Mon Oct 31 14:51:28 2011 +0200
    18.3 @@ -0,0 +1,9 @@
    18.4 +:mod:`flup.server.threadedserver`
    18.5 +=================================
    18.6 +
    18.7 +.. automodule:: flup.server.threadedserver
    18.8 +   :members:
    18.9 +   :undoc-members:
   18.10 +   :inherited-members:
   18.11 +
   18.12 +
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/docs/source/modules/flup.server.threadpool.rst	Mon Oct 31 14:51:28 2011 +0200
    19.3 @@ -0,0 +1,8 @@
    19.4 +:mod:`flup.server.threadpool`
    19.5 +=============================
    19.6 +
    19.7 +.. automodule:: flup.server.threadpool
    19.8 +   :members:
    19.9 +   :undoc-members:
   19.10 +   :inherited-members:
   19.11 +
    20.1 --- a/flup/server/ajp.py	Mon Oct 31 14:45:14 2011 +0200
    20.2 +++ b/flup/server/ajp.py	Mon Oct 31 14:51:28 2011 +0200
    20.3 @@ -1,39 +1,45 @@
    20.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    20.5 -# All rights reserved.
    20.6 -#
    20.7 -# Redistribution and use in source and binary forms, with or without
    20.8 -# modification, are permitted provided that the following conditions
    20.9 -# are met:
   20.10 -# 1. Redistributions of source code must retain the above copyright
   20.11 -#    notice, this list of conditions and the following disclaimer.
   20.12 -# 2. Redistributions in binary form must reproduce the above copyright
   20.13 -#    notice, this list of conditions and the following disclaimer in the
   20.14 -#    documentation and/or other materials provided with the distribution.
   20.15 -#
   20.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   20.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   20.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   20.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   20.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   20.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   20.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   20.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   20.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   20.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   20.26 -# SUCH DAMAGE.
   20.27 -#
   20.28 -# $Id$
   20.29 +"""
   20.30 +.. highlight:: python
   20.31 +   :linenothreshold: 5
   20.32  
   20.33 -"""
   20.34 +.. highlight:: bash
   20.35 +   :linenothreshold: 5
   20.36 +
   20.37  ajp - an AJP 1.3/WSGI gateway.
   20.38  
   20.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
   20.40 +  All rights reserved.
   20.41 +:license:
   20.42 +
   20.43 + Redistribution and use in source and binary forms, with or without
   20.44 + modification, are permitted provided that the following conditions
   20.45 + are met:
   20.46 +
   20.47 + 1. Redistributions of source code must retain the above copyright
   20.48 +    notice, this list of conditions and the following disclaimer.
   20.49 + 2. Redistributions in binary form must reproduce the above copyright
   20.50 +    notice, this list of conditions and the following disclaimer in the
   20.51 +    documentation and/or other materials provided with the distribution.
   20.52 +
   20.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
   20.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   20.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   20.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   20.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   20.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   20.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   20.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   20.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   20.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   20.63 + SUCH DAMAGE.
   20.64 +
   20.65  For more information about AJP and AJP connectors for your web server, see
   20.66 -<http://jakarta.apache.org/tomcat/connectors-doc/>.
   20.67 +http://jakarta.apache.org/tomcat/connectors-doc/.
   20.68  
   20.69  For more information about the Web Server Gateway Interface, see
   20.70 -<http://www.python.org/peps/pep-0333.html>.
   20.71 +http://www.python.org/peps/pep-0333.html.
   20.72  
   20.73 -Example usage:
   20.74 +Example usage::
   20.75  
   20.76    #!/usr/bin/env python
   20.77    import sys
   20.78 @@ -50,7 +56,7 @@
   20.79  re-run. When a SIGINT or SIGTERM is received, the script exits with status
   20.80  code 0, possibly indicating a normal exit.
   20.81  
   20.82 -Example wrapper script:
   20.83 +Example wrapper script::
   20.84  
   20.85    #!/bin/sh
   20.86    STATUS=42
   20.87 @@ -59,14 +65,14 @@
   20.88      STATUS=$?
   20.89    done
   20.90  
   20.91 -Example workers.properties (for mod_jk):
   20.92 +Example workers.properties (for mod_jk)::
   20.93  
   20.94    worker.list=foo
   20.95    worker.foo.port=8009
   20.96    worker.foo.host=localhost
   20.97    worker.foo.type=ajp13
   20.98  
   20.99 -Example httpd.conf (for mod_jk):
  20.100 +Example httpd.conf (for mod_jk)::
  20.101  
  20.102    JkWorkersFile /path/to/workers.properties
  20.103    JkMount /* foo
  20.104 @@ -98,7 +104,7 @@
  20.105      implement. :)
  20.106  
  20.107      Of course you will need an AJP1.3 connector for your webserver (e.g.
  20.108 -    mod_jk) - see <http://jakarta.apache.org/tomcat/connectors-doc/>.
  20.109 +    mod_jk) - see http://jakarta.apache.org/tomcat/connectors-doc/.
  20.110      """
  20.111      def __init__(self, application, scriptName='', environ=None,
  20.112                   multithreaded=True, multiprocess=False,
    21.1 --- a/flup/server/ajp_fork.py	Mon Oct 31 14:45:14 2011 +0200
    21.2 +++ b/flup/server/ajp_fork.py	Mon Oct 31 14:51:28 2011 +0200
    21.3 @@ -1,37 +1,43 @@
    21.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    21.5 -# All rights reserved.
    21.6 -#
    21.7 -# Redistribution and use in source and binary forms, with or without
    21.8 -# modification, are permitted provided that the following conditions
    21.9 -# are met:
   21.10 -# 1. Redistributions of source code must retain the above copyright
   21.11 -#    notice, this list of conditions and the following disclaimer.
   21.12 -# 2. Redistributions in binary form must reproduce the above copyright
   21.13 -#    notice, this list of conditions and the following disclaimer in the
   21.14 -#    documentation and/or other materials provided with the distribution.
   21.15 -#
   21.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   21.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   21.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   21.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   21.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   21.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   21.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   21.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   21.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   21.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   21.26 -# SUCH DAMAGE.
   21.27 -#
   21.28 -# $Id$
   21.29 +"""
   21.30 +.. highlight:: python
   21.31 +   :linenothreshold: 5
   21.32  
   21.33 -"""
   21.34 +.. highlight:: bash
   21.35 +   :linenothreshold: 5
   21.36 +
   21.37  ajp - an AJP 1.3/WSGI gateway.
   21.38  
   21.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
   21.40 +  All rights reserved.
   21.41 +:license:
   21.42 +
   21.43 + Redistribution and use in source and binary forms, with or without
   21.44 + modification, are permitted provided that the following conditions
   21.45 + are met:
   21.46 +
   21.47 + 1. Redistributions of source code must retain the above copyright
   21.48 +    notice, this list of conditions and the following disclaimer.
   21.49 + 2. Redistributions in binary form must reproduce the above copyright
   21.50 +    notice, this list of conditions and the following disclaimer in the
   21.51 +    documentation and/or other materials provided with the distribution.
   21.52 +
   21.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
   21.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   21.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   21.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   21.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   21.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   21.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   21.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   21.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   21.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   21.63 + SUCH DAMAGE.
   21.64 +
   21.65  For more information about AJP and AJP connectors for your web server, see
   21.66 -<http://jakarta.apache.org/tomcat/connectors-doc/>.
   21.67 +http://jakarta.apache.org/tomcat/connectors-doc/.
   21.68  
   21.69  For more information about the Web Server Gateway Interface, see
   21.70 -<http://www.python.org/peps/pep-0333.html>.
   21.71 +http://www.python.org/peps/pep-0333.html.
   21.72  
   21.73  Example usage:
   21.74  
   21.75 @@ -50,7 +56,7 @@
   21.76  re-run. When a SIGINT or SIGTERM is received, the script exits with status
   21.77  code 0, possibly indicating a normal exit.
   21.78  
   21.79 -Example wrapper script:
   21.80 +Example wrapper script::
   21.81  
   21.82    #!/bin/sh
   21.83    STATUS=42
   21.84 @@ -59,14 +65,14 @@
   21.85      STATUS=$?
   21.86    done
   21.87  
   21.88 -Example workers.properties (for mod_jk):
   21.89 +Example workers.properties (for mod_jk)::
   21.90  
   21.91    worker.list=foo
   21.92    worker.foo.port=8009
   21.93    worker.foo.host=localhost
   21.94    worker.foo.type=ajp13
   21.95  
   21.96 -Example httpd.conf (for mod_jk):
   21.97 +Example httpd.conf (for mod_jk)::
   21.98  
   21.99    JkWorkersFile /path/to/workers.properties
  21.100    JkMount /* foo
  21.101 @@ -98,7 +104,7 @@
  21.102      implement. :)
  21.103  
  21.104      Of course you will need an AJP1.3 connector for your webserver (e.g.
  21.105 -    mod_jk) - see <http://jakarta.apache.org/tomcat/connectors-doc/>.
  21.106 +    mod_jk) - see http://jakarta.apache.org/tomcat/connectors-doc/.
  21.107      """
  21.108      def __init__(self, application, scriptName='', environ=None,
  21.109                   bindAddress=('localhost', 8009), allowedServers=None,
    22.1 --- a/flup/server/fcgi_fork.py	Mon Oct 31 14:45:14 2011 +0200
    22.2 +++ b/flup/server/fcgi_fork.py	Mon Oct 31 14:51:28 2011 +0200
    22.3 @@ -1,38 +1,44 @@
    22.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    22.5 -# All rights reserved.
    22.6 -#
    22.7 -# Redistribution and use in source and binary forms, with or without
    22.8 -# modification, are permitted provided that the following conditions
    22.9 -# are met:
   22.10 -# 1. Redistributions of source code must retain the above copyright
   22.11 -#    notice, this list of conditions and the following disclaimer.
   22.12 -# 2. Redistributions in binary form must reproduce the above copyright
   22.13 -#    notice, this list of conditions and the following disclaimer in the
   22.14 -#    documentation and/or other materials provided with the distribution.
   22.15 -#
   22.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   22.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   22.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   22.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   22.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   22.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   22.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   22.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   22.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   22.26 -# SUCH DAMAGE.
   22.27 -#
   22.28 -# $Id$
   22.29 +"""
   22.30 +.. highlight:: python
   22.31 +   :linenothreshold: 5
   22.32  
   22.33 -"""
   22.34 +.. highlight:: bash
   22.35 +   :linenothreshold: 5
   22.36 +
   22.37  fcgi - a FastCGI/WSGI gateway.
   22.38  
   22.39 -For more information about FastCGI, see <http://www.fastcgi.com/>.
   22.40 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
   22.41 +  All rights reserved.
   22.42 +:license:
   22.43 +
   22.44 + Redistribution and use in source and binary forms, with or without
   22.45 + modification, are permitted provided that the following conditions
   22.46 + are met:
   22.47 +
   22.48 + 1. Redistributions of source code must retain the above copyright
   22.49 +    notice, this list of conditions and the following disclaimer.
   22.50 + 2. Redistributions in binary form must reproduce the above copyright
   22.51 +    notice, this list of conditions and the following disclaimer in the
   22.52 +    documentation and/or other materials provided with the distribution.
   22.53 +
   22.54 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
   22.55 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22.56 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   22.57 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   22.58 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   22.59 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   22.60 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   22.61 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   22.62 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   22.63 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   22.64 + SUCH DAMAGE.
   22.65 +
   22.66 +For more information about FastCGI, see http://www.fastcgi.com/.
   22.67  
   22.68  For more information about the Web Server Gateway Interface, see
   22.69 -<http://www.python.org/peps/pep-0333.html>.
   22.70 +http://www.python.org/peps/pep-0333.html.
   22.71  
   22.72 -Example usage:
   22.73 +Example usage::
   22.74  
   22.75    #!/usr/bin/env python
   22.76    from myapplication import app # Assume app is your WSGI application object
   22.77 @@ -60,7 +66,7 @@
   22.78  class WSGIServer(BaseFCGIServer, PreforkServer):
   22.79      """
   22.80      FastCGI server that supports the Web Server Gateway Interface. See
   22.81 -    <http://www.python.org/peps/pep-0333.html>.
   22.82 +    http://www.python.org/peps/pep-0333.html.
   22.83      """
   22.84      def __init__(self, application, environ=None,
   22.85                   bindAddress=None, umask=None, multiplexed=False,
    23.1 --- a/flup/server/paste_factory.py	Mon Oct 31 14:45:14 2011 +0200
    23.2 +++ b/flup/server/paste_factory.py	Mon Oct 31 14:51:28 2011 +0200
    23.3 @@ -29,7 +29,7 @@
    23.4          return [obj]
    23.5  
    23.6  def run_ajp_thread(wsgi_app, global_conf,
    23.7 -                   scriptName=NoDefault, host='localhost', port='8009',
    23.8 +                   scriptName='', host='localhost', port='8009',
    23.9                     allowedServers='127.0.0.1', debug=NoDefault):
   23.10      import flup.server.ajp
   23.11      addr = (host, int(port))
    24.1 --- a/flup/server/scgi.py	Mon Oct 31 14:45:14 2011 +0200
    24.2 +++ b/flup/server/scgi.py	Mon Oct 31 14:51:28 2011 +0200
    24.3 @@ -1,39 +1,45 @@
    24.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    24.5 -# All rights reserved.
    24.6 -#
    24.7 -# Redistribution and use in source and binary forms, with or without
    24.8 -# modification, are permitted provided that the following conditions
    24.9 -# are met:
   24.10 -# 1. Redistributions of source code must retain the above copyright
   24.11 -#    notice, this list of conditions and the following disclaimer.
   24.12 -# 2. Redistributions in binary form must reproduce the above copyright
   24.13 -#    notice, this list of conditions and the following disclaimer in the
   24.14 -#    documentation and/or other materials provided with the distribution.
   24.15 -#
   24.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   24.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   24.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   24.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   24.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   24.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   24.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   24.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   24.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   24.26 -# SUCH DAMAGE.
   24.27 -#
   24.28 -# $Id$
   24.29 +"""
   24.30 +.. highlight:: python
   24.31 +   :linenothreshold: 5
   24.32  
   24.33 -"""
   24.34 +.. highlight:: bash
   24.35 +   :linenothreshold: 5
   24.36 +
   24.37  scgi - an SCGI/WSGI gateway.
   24.38  
   24.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
   24.40 +  All rights reserved.
   24.41 +:license:
   24.42 +
   24.43 + Redistribution and use in source and binary forms, with or without
   24.44 + modification, are permitted provided that the following conditions
   24.45 + are met:
   24.46 +
   24.47 + 1. Redistributions of source code must retain the above copyright
   24.48 +    notice, this list of conditions and the following disclaimer.
   24.49 + 2. Redistributions in binary form must reproduce the above copyright
   24.50 +    notice, this list of conditions and the following disclaimer in the
   24.51 +    documentation and/or other materials provided with the distribution.
   24.52 +
   24.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
   24.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   24.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   24.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   24.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   24.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   24.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   24.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   24.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   24.63 + SUCH DAMAGE.
   24.64 +
   24.65  For more information about SCGI and mod_scgi for Apache1/Apache2, see
   24.66 -<http://www.mems-exchange.org/software/scgi/>.
   24.67 +http://www.mems-exchange.org/software/scgi/.
   24.68  
   24.69  For more information about the Web Server Gateway Interface, see
   24.70 -<http://www.python.org/peps/pep-0333.html>.
   24.71 +http://www.python.org/peps/pep-0333.html.
   24.72  
   24.73 -Example usage:
   24.74 +Example usage::
   24.75  
   24.76    #!/usr/bin/env python
   24.77    import sys
   24.78 @@ -50,7 +56,7 @@
   24.79  re-run. When a SIGINT or SIGTERM is received, the script exits with status
   24.80  code 0, possibly indicating a normal exit.
   24.81  
   24.82 -Example wrapper script:
   24.83 +Example wrapper script::
   24.84  
   24.85    #!/bin/sh
   24.86    STATUS=42
   24.87 @@ -75,9 +81,9 @@
   24.88  class WSGIServer(BaseSCGIServer, ThreadedServer):
   24.89      """
   24.90      SCGI/WSGI server. For information about SCGI (Simple Common Gateway
   24.91 -    Interface), see <http://www.mems-exchange.org/software/scgi/>.
   24.92 +    Interface), see http://www.mems-exchange.org/software/scgi/.
   24.93  
   24.94 -    This server is similar to SWAP <http://www.idyll.org/~t/www-tools/wsgi/>,
   24.95 +    This server is similar to SWAP http://www.idyll.org/~t/www-tools/wsgi/,
   24.96      another SCGI/WSGI server.
   24.97  
   24.98      It differs from SWAP in that it isn't based on scgi.scgi_server and
   24.99 @@ -112,7 +118,7 @@
  24.100          the umask is to be changed to before the socket is created in the
  24.101          filesystem. After the socket is created, the previous umask is
  24.102          restored.
  24.103 -        
  24.104 +
  24.105          allowedServers must be None or a list of strings representing the
  24.106          IPv4 addresses of servers allowed to connect. None means accept
  24.107          connections from anywhere.
    25.1 --- a/flup/server/scgi_fork.py	Mon Oct 31 14:45:14 2011 +0200
    25.2 +++ b/flup/server/scgi_fork.py	Mon Oct 31 14:51:28 2011 +0200
    25.3 @@ -1,39 +1,45 @@
    25.4 -# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
    25.5 -# All rights reserved.
    25.6 -#
    25.7 -# Redistribution and use in source and binary forms, with or without
    25.8 -# modification, are permitted provided that the following conditions
    25.9 -# are met:
   25.10 -# 1. Redistributions of source code must retain the above copyright
   25.11 -#    notice, this list of conditions and the following disclaimer.
   25.12 -# 2. Redistributions in binary form must reproduce the above copyright
   25.13 -#    notice, this list of conditions and the following disclaimer in the
   25.14 -#    documentation and/or other materials provided with the distribution.
   25.15 -#
   25.16 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   25.17 -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   25.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25.19 -# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   25.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   25.22 -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   25.23 -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   25.24 -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   25.25 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   25.26 -# SUCH DAMAGE.
   25.27 -#
   25.28 -# $Id$
   25.29 +"""
   25.30 +.. highlight:: python
   25.31 +   :linenothreshold: 5
   25.32  
   25.33 -"""
   25.34 +.. highlight:: bash
   25.35 +   :linenothreshold: 5
   25.36 +
   25.37  scgi - an SCGI/WSGI gateway.
   25.38  
   25.39 +:copyright: Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com>
   25.40 +  All rights reserved.
   25.41 +:license:
   25.42 +
   25.43 + Redistribution and use in source and binary forms, with or without
   25.44 + modification, are permitted provided that the following conditions
   25.45 + are met:
   25.46 +
   25.47 + 1. Redistributions of source code must retain the above copyright
   25.48 +    notice, this list of conditions and the following disclaimer.
   25.49 + 2. Redistributions in binary form must reproduce the above copyright
   25.50 +    notice, this list of conditions and the following disclaimer in the
   25.51 +    documentation and/or other materials provided with the distribution.
   25.52 +
   25.53 + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS **AS IS** AND
   25.54 + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   25.55 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25.56 + ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   25.57 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25.58 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   25.59 + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   25.60 + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   25.61 + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   25.62 + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   25.63 + SUCH DAMAGE.
   25.64 +
   25.65  For more information about SCGI and mod_scgi for Apache1/Apache2, see
   25.66 -<http://www.mems-exchange.org/software/scgi/>.
   25.67 +http://www.mems-exchange.org/software/scgi/.
   25.68  
   25.69  For more information about the Web Server Gateway Interface, see
   25.70 -<http://www.python.org/peps/pep-0333.html>.
   25.71 +http://www.python.org/peps/pep-0333.html.
   25.72  
   25.73 -Example usage:
   25.74 +Example usage::
   25.75  
   25.76    #!/usr/bin/env python
   25.77    import sys
   25.78 @@ -50,7 +56,7 @@
   25.79  re-run. When a SIGINT or SIGTERM is received, the script exits with status
   25.80  code 0, possibly indicating a normal exit.
   25.81  
   25.82 -Example wrapper script:
   25.83 +Example wrapper script::
   25.84  
   25.85    #!/bin/sh
   25.86    STATUS=42
   25.87 @@ -75,9 +81,9 @@
   25.88  class WSGIServer(BaseSCGIServer, PreforkServer):
   25.89      """
   25.90      SCGI/WSGI server. For information about SCGI (Simple Common Gateway
   25.91 -    Interface), see <http://www.mems-exchange.org/software/scgi/>.
   25.92 +    Interface), see http://www.mems-exchange.org/software/scgi/.
   25.93  
   25.94 -    This server is similar to SWAP <http://www.idyll.org/~t/www-tools/wsgi/>,
   25.95 +    This server is similar to SWAP http://www.idyll.org/~t/www-tools/wsgi/,
   25.96      another SCGI/WSGI server.
   25.97  
   25.98      It differs from SWAP in that it isn't based on scgi.scgi_server and
   25.99 @@ -111,7 +117,7 @@
  25.100          the umask is to be changed to before the socket is created in the
  25.101          filesystem. After the socket is created, the previous umask is
  25.102          restored.
  25.103 -        
  25.104 +
  25.105          allowedServers must be None or a list of strings representing the
  25.106          IPv4 addresses of servers allowed to connect. None means accept
  25.107          connections from anywhere.