~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead.py

  • Committer: Michael Hudson
  • Date: 2008-06-22 21:33:23 UTC
  • mto: This revision was merged to the branch mainline in revision 169.
  • Revision ID: michael.hudson@canonical.com-20080622213323-6v61zffs0q9a6iwx
fix?

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
 
        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)
 
124
        from paste.deploy.config import PrefixMiddleware
 
125
        app = PrefixMiddleware(translate_forwarded_server=True, prefix=webpath)
129
126
 
130
127
    try:
131
128
        httpserver.serve(