~ubuntu-branches/ubuntu/natty/flup/natty

« back to all changes in this revision

Viewing changes to flup/server/scgi.py

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2007-09-12 20:22:04 UTC
  • mfrom: (1.2.1 upstream) (4 gutsy)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20070912202204-fg63etr9vzaf8hea
* New upstream release
* http://www.saddi.com/software/news/archives/58-flup-1.0-released.html
* Added a note in the description that people should probably start thinking
  of moving to modwsgi.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23
23
# SUCH DAMAGE.
24
24
#
25
 
# $Id: scgi.py 2111 2006-11-25 02:00:21Z asaddi $
 
25
# $Id: scgi.py 2306 2007-01-02 22:15:53Z asaddi $
26
26
 
27
27
"""
28
28
scgi - an SCGI/WSGI gateway.
61
61
"""
62
62
 
63
63
__author__ = 'Allan Saddi <allan@saddi.com>'
64
 
__version__ = '$Revision: 2111 $'
 
64
__version__ = '$Revision: 2306 $'
65
65
 
66
66
import logging
67
67
import socket
68
68
 
69
 
from scgi_base import BaseSCGIServer, Connection
70
 
from threadedserver import ThreadedServer
 
69
from flup.server.scgi_base import BaseSCGIServer, Connection, NoDefault
 
70
from flup.server.threadedserver import ThreadedServer
71
71
 
72
72
__all__ = ['WSGIServer']
73
73
 
87
87
    of preforking to be quite superior. So if your application really doesn't
88
88
    mind running in multiple processes, go use SWAP. ;)
89
89
    """
90
 
    def __init__(self, application, scriptName='', environ=None,
 
90
    def __init__(self, application, scriptName=NoDefault, environ=None,
91
91
                 multithreaded=True, multiprocess=False,
92
92
                 bindAddress=('localhost', 4000), umask=None,
93
93
                 allowedServers=None,
188
188
        yield '</table>\n' \
189
189
              '</body></html>\n'
190
190
 
 
191
    from wsgiref import validate
 
192
    test_app = validate.validator(test_app)
191
193
    WSGIServer(test_app,
192
194
               loggingLevel=logging.DEBUG).run()