Print environ.cgi: Difference between revisions

From XPUB & Lens-Based wiki
(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...)
(No difference)

Revision as of 18:10, 19 January 2009

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