Lines Matching refs:cgi
2 import cgi
16 cgi.sys = HackedSysModule()
55 return cgi.parse(fp, env, strict_parsing=1)
115 form = cgi.FieldStorage(fp=fake_stdin, environ=environ)
126 self.assertEqual("test & string", cgi.escape("test & string"))
127 self.assertEqual("<test string>", cgi.escape("<test string>"))
128 self.assertEqual(""test string"", cgi.escape('"test string"', True))
139 fcd = cgi.FormContentDict(env)
140 sd = cgi.SvFormContentDict(env)
141 fs = cgi.FieldStorage(environ=env)
183 d = cgi.InterpFormContentDict(env)
191 cgi.log("Testing")
193 cgi.logfp = StringIO()
194 cgi.initlog("%s", "Testing initlog 1")
195 cgi.log("%s", "Testing log 2")
196 self.assertEqual(cgi.logfp.getvalue(), "Testing initlog 1\nTesting log 2\n")
198 cgi.logfp = None
199 cgi.logfile = "/dev/null"
200 cgi.initlog("%s", "Testing log 3")
201 cgi.log("Testing log 4")
231 fs = cgi.FieldStorage(fp=f, environ=env)
238 fs = cgi.FieldStorage()
268 fs = cgi.FieldStorage(fp=StringIO(postdata), environ=env)
384 cgi.parse_qs('a=A1&b=B2&B=B3'))
391 cgi.parse_qsl('a=A1&b=B2&B=B3'))
395 cgi.parse_header("text/plain"),
398 cgi.parse_header("text/vnd.just.made.this.up ; "),
401 cgi.parse_header("text/plain;charset=us-ascii"),
404 cgi.parse_header('text/plain ; charset="us-ascii"'),
407 cgi.parse_header('text/plain ; charset="us-ascii"; another=opt'),
410 cgi.parse_header('attachment; filename="silly.txt"'),
413 cgi.parse_header('attachment; filename="strange;name"'),
416 cgi.parse_header('attachment; filename="strange;name";size=123;'),
419 cgi.parse_header('form-data; name="files"; filename="fo\\"o;bar"'),