Print environ.cgi

From XPUB & Lens-Based wiki

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()