Print environ.cgi

From XPUB & Lens-Based wiki
Revision as of 17:10, 19 January 2009 by Michael Murtaugh (talk | contribs) (New page: Python's cgi module has a built in function to "dump" the entire environment of an HTTP request. Quite useful for debugging. <source lang="python"> import cgi fs = cgi.FieldStorage() pri...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Python's cgi module has a built in function to "dump" the entire environment of an HTTP request. Quite useful for debugging.

import cgi
fs = cgi.FieldStorage()

print "Content-type: text/html"
print
fs.print_environ()