diff options
| author | ianb <devnull@localhost> | 2005-05-18 02:26:00 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-05-18 02:26:00 +0000 |
| commit | a37ab98bc05b19b47af0dd466d75e01cddfa36d1 (patch) | |
| tree | 718762fb12425433a794ea50de03cd748b7a4624 /paste | |
| parent | 0b06542299f07c8f711fd8a58e0c4fdd3a8247bd (diff) | |
| download | paste-a37ab98bc05b19b47af0dd466d75e01cddfa36d1.tar.gz | |
Made prefix consistent with other servers (root_url), and make sure there's no trailing / (which breaks stuff)
Diffstat (limited to 'paste')
| -rw-r--r-- | paste/servers/scgi_server/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/paste/servers/scgi_server/__init__.py b/paste/servers/scgi_server/__init__.py index a2a2f0d..1ca2c11 100644 --- a/paste/servers/scgi_server/__init__.py +++ b/paste/servers/scgi_server/__init__.py @@ -3,11 +3,14 @@ thirdparty.add_package('scgi') from scgiserver import serve_application def serve(conf, app): - prefix = conf.get('scgi_prefix', '/') + prefix = conf.get('root_url', '') + while prefix.endswith('/'): + prefix = prefix[:-1] serve_application(app, prefix, port=int(conf.get('port', 4000))) options = [ ('port', 'Port to serve on (default 4000).'), + ('root_url', 'The URL level to expect for incoming connections; if not set and this is not bound to /, then SCRIPT_NAME and PATH_INFO may be incorrect.'), ] description = """\ |
