We'll want to know it later.
### CGI input.
## Lots of global variables to be filled in by `cgiparse'.
### CGI input.
## Lots of global variables to be filled in by `cgiparse'.
COOKIE = {}
SPECIAL = {}
PARAM = []
COOKIE = {}
SPECIAL = {}
PARAM = []
True if the client connection is carried over SSL or TLS.
"""
True if the client connection is carried over SSL or TLS.
"""
def getenv(var):
try: return ENV[var]
except KeyError: raise U.ExpectedError, (500, "No `%s' supplied" % var)
## Yes, we want the request method.
def getenv(var):
try: return ENV[var]
except KeyError: raise U.ExpectedError, (500, "No `%s' supplied" % var)
## Yes, we want the request method.
- method = getenv('REQUEST_METHOD')
+ METHOD = getenv('REQUEST_METHOD')
## Acquire the query string.
## Acquire the query string.
q = getenv('QUERY_STRING')
q = getenv('QUERY_STRING')
## We must read the query string from stdin.
n = getenv('CONTENT_LENGTH')
## We must read the query string from stdin.
n = getenv('CONTENT_LENGTH')
raise U.ExpectedError, (500, "Failed to read correct length")
else:
raise U.ExpectedError, (500, "Failed to read correct length")
else:
- raise U.ExpectedError, (500, "Unexpected request method `%s'" % method)
+ raise U.ExpectedError, (500, "Unexpected request method `%s'" % METHOD)
## Populate the `SPECIAL', `PARAM' and `PARAMDICT' tables.
seen = set()
## Populate the `SPECIAL', `PARAM' and `PARAMDICT' tables.
seen = set()