~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead.py

  • Committer: Martin Albisetti
  • Date: 2008-06-22 18:04:15 UTC
  • Revision ID: argentina@gmail.com-20080622180415-9ognqtaiptt58z7p
 * Remove homepage
 * Remove release tarballs
 * Remove push-website script
 * Edit MANIFEST.in to reflect current content

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
import logging
4
4
import logging.handlers
5
 
from optparse import OptionParser
6
5
import os
7
6
import sys
8
 
import urlparse
 
7
from optparse import OptionParser
9
8
 
10
9
from configobj import ConfigObj
11
10
 
122
121
    app = make_filter(app, None)
123
122
 
124
123
    if webpath:
125
 
        scheme, netloc, path, blah, blah, blah = urlparse.urlparse(webpath)
126
 
        def app(environ, start_response, orig=app):
127
 
            environ['SCRIPT_NAME'] = path
128
 
            environ['HTTP_HOST'] = netloc
129
 
            return orig(environ, start_response)
 
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)
130
129
 
131
130
    try:
132
131
        httpserver.serve(