From: Divye K. <div...@gm...> - 2008-08-21 17:11:08
|
Hi Dean, I hope this response isn't too late. > > Does anybody know how I can get the HTTP Headers from the request that > invokes the CGI script? > Try LiveHTTPHeaders. It's an add-on for Firefox that allows you to see the headers that are sent by the server in response to a particular request. https://addons.mozilla.org/en-US/firefox/addon/3829 You can make a GET request directly by accessing http://localhost:8000/cgi-bin/requestinfo.py?var=value and see the headers. To make a POST request, create a simple HTML form <html> <head> <title></title> </head> <body> <form action="cgi-bin/requestinfo.py?arg=argument" method="POST"> <input type="text" name="test" /> <input type="hidden" name="hiddenparam" value="hiddenvalue" /> <input type="submit" value="submit" /> </form> </body> </html> and save it in the test\server directory. Type in some text and press the submit button. View the headers using LiveHTTPHeaders. Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |