Lines Matching refs:environ
124 def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
131 environ : environment dictionary; default: os.environ
146 if not 'REQUEST_METHOD' in environ:
147 environ['REQUEST_METHOD'] = 'GET' # For testing stand-alone
148 if environ['REQUEST_METHOD'] == 'POST':
149 ctype, pdict = parse_header(environ['CONTENT_TYPE'])
153 clength = int(environ['CONTENT_LENGTH'])
159 if 'QUERY_STRING' in environ:
161 qs = qs + environ['QUERY_STRING']
165 environ['QUERY_STRING'] = qs # XXX Shouldn't, really
166 elif 'QUERY_STRING' in environ:
167 qs = environ['QUERY_STRING']
173 environ['QUERY_STRING'] = qs # XXX Shouldn't, really
396 environ=os.environ, keep_blank_values=0, strict_parsing=0):
405 taken from environ as per CGI spec
410 environ : environment dictionary; default: os.environ
427 if 'REQUEST_METHOD' in environ:
428 method = environ['REQUEST_METHOD'].upper()
431 if 'QUERY_STRING' in environ:
432 qs = environ['QUERY_STRING']
446 if 'CONTENT_TYPE' in environ:
447 headers['content-type'] = environ['CONTENT_TYPE']
448 if 'QUERY_STRING' in environ:
449 self.qs_on_post = environ['QUERY_STRING']
450 if 'CONTENT_LENGTH' in environ:
451 headers['content-length'] = environ['CONTENT_LENGTH']
507 self.read_multi(environ, keep_blank_values, strict_parsing)
617 def read_multi(self, environ, keep_blank_values, strict_parsing):
631 environ, keep_blank_values, strict_parsing)
636 environ, keep_blank_values, strict_parsing)
787 def __init__(self, environ=os.environ, keep_blank_values=0, strict_parsing=0):
788 self.dict = self.data = parse(environ=environ,
791 self.query_string = environ['QUERY_STRING']
882 def test(environ=os.environ):
897 print_environ(environ)
917 print_environ(environ)
935 def print_environ(environ=os.environ):
937 keys = environ.keys()
943 print "<DT>", escape(key), "<DD>", escape(environ[key])