newLISP Fan Club

Forum => newLISP in the real world => Topic started by: eddier on August 11, 2003, 11:22:57 AM

Title: post method
Post by: eddier on August 11, 2003, 11:22:57 AM
I'm trying to use the post cgi method



I use <form action="blah.cgi" method="post"> in my cgi



Netscape says the method is post when I view the cgi



However in my cgi program



(getenv "CONTENT_TYPE")



returns "GET"



We have apache running on a Linux server.



eddier
Title:
Post by: Lutz on August 12, 2003, 02:06:11 PM
Hi Eddie, good to hear from you!



Goto http://nuevatec.com/form.html  fill it out and submit it. The resulting page is done via form.cgi in newLISP. Both files form.html and form.cgi are in the distribution.



On nuevatec.com I am also running Apache (on FreeBSD), but the request type is in the environment variable REQUEST_METHOD and not in CONTENT_TYPE which refers to text/html etc.



See also the file cgi.lsp, which may help you doing newLISP CGI





Lutz
Title:
Post by: Lutz on August 12, 2003, 02:14:21 PM
I get on my server for CONTENT_TYPE:



application/x-www-form-urlencoded



which seems to be correct



Lutz
Title:
Post by: eddier on August 12, 2003, 02:38:48 PM
Sorry I haven't posted in a long while. Busy with Institutional Research and other Projects.



You are right! I feel so stupid! When using REQEST_METHOD it works as it should.



Oh by the way, when I'm on Windoze, there is a nice editor called SciTe. You can copy the keywords from your keyword file and open the lisp properties from within SciTe and drop them in. Also, you can change the exec path for newlisp.exe and use the "F5" key to execute programs from within SciTe. Best of all the editor is free. It also puts - by "() parts so you can expand or compact them (helpful on those large programs).



Since I have a Linux now, I hardly ever use windoze anymore!



Eddie
Title:
Post by: Lutz on August 12, 2003, 04:54:05 PM
Thanks for the editor tip



Lutz