~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead.py

  • Committer: Michael Hudson
  • Date: 2008-06-20 03:46:24 UTC
  • mfrom: (159.2.51 wsgi-ify)
  • Revision ID: michael.hudson@canonical.com-20080620034624-p46dvwbhppj2pojw
merge wsgi-ify
this removes the dependency on turbogears and cherrypy in favour of one on
paste (http://pythonpaste.org).
it adds a new executable, serve-branches.py, that serves branches following the
structure of the file system, but also converts start-loggerhead.py to serve
things from a loggerhead.conf file the 'old-fashioned' way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
    app = make_filter(app, None)
122
122
 
123
123
    if webpath:
124
 
        from paste.deploy.config import PrefixMiddleware
125
 
        app = PrefixMiddleware(translate_forwarded_server=True, prefix=webpath)
 
124
        if not webpath.endswith('/'):
 
125
            webpath += '/'
 
126
        def app(environ, start_response, app=app):
 
127
            environ['SCRIPT_NAME'] = webpath
 
128
            return app(environ, start_response)
126
129
 
127
130
    try:
128
131
        httpserver.serve(