summaryrefslogtreecommitdiff
path: root/paste
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-05-18 02:26:00 +0000
committerianb <devnull@localhost>2005-05-18 02:26:00 +0000
commita37ab98bc05b19b47af0dd466d75e01cddfa36d1 (patch)
tree718762fb12425433a794ea50de03cd748b7a4624 /paste
parent0b06542299f07c8f711fd8a58e0c4fdd3a8247bd (diff)
downloadpaste-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__.py5
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 = """\