X-Git-Url: https://git.distorted.org.uk/~mdw/chopwood/blobdiff_plain/5b7c6334a8922d1fe49fb713d4432cbe667133f2..HEAD:/cgi.py diff --git a/cgi.py b/cgi.py index 227d33b..6ad9e75 100644 --- a/cgi.py +++ b/cgi.py @@ -51,7 +51,11 @@ CONF.DEFAULTS.update( ## A (maybe relative) URL for static content. By default this comes from ## the main script, but we hope that user agents cache it. - STATIC = _script_name + '/static') + STATIC = None) + +@CONF.hook +def set_static(): + if CFG.STATIC is None: CFG.STATIC = CFG.SCRIPT_NAME + '/static' ###-------------------------------------------------------------------------- ### Escaping and encoding. @@ -403,7 +407,7 @@ def cgiparse(): ## Acquire the query string. if METHOD in ['GET', 'HEAD']: - q = getenv('QUERY_STRING') + q = ENV.get('QUERY_STRING', '') elif METHOD == 'POST':