Amir Tahvildaran on 22 Nov 2011 11:00:45 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Python CGI Problem w/ GET and POST


I'm not a python person but I know other frameworks separate GET and POST intentionally.

There seems to be some chatter about GET/POST for python:
http://bugs.python.org/issue1817
http://stackoverflow.com/questions/2781493/cgi-fieldstorage-always-empty-never-returns-posted-form-data

Hope that helps
-Amir

On Mon, Nov 21, 2011 at 8:17 PM, Casey Bralla <MailList@nerdworld.org> wrote:

Any python CGI programmers on the list?

 

I've got a weird problem. I can use the "get" command to send data to my cgi script (running python), but if I use "post", I get no data at all.

 

So on the web page, I'll have something like:

 

<FORM action="" method="get">

<INPUT type="submit" value="Project Summary" >

</FORM>

 

This works, and the cgi.FieldStorage() routine correctly picks up the data sent with the input command. Also, the data appears on the URL line.

 

However, if I substitute a "post" for "get", the URL line is blank (as it should be), but cgi.FieldStorage is completely null.

 

 

Anybody have any ideas what is going on?

 

TIA!

--

 

Casey Bralla

Chief Nerd in Residence

 

The NerdWorld Organisation

http://www.NerdWorld.org


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug