post method

Q&A's, tips, howto's

post method

Postby eddier » Mon Aug 11, 2003 6:22 pm

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
eddier
 
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Postby Lutz » Tue Aug 12, 2003 9:06 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
Last edited by Lutz on Tue Aug 12, 2003 9:14 pm, edited 1 time in total.
Lutz
 
Posts: 5276
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Postby Lutz » Tue Aug 12, 2003 9:14 pm

I get on my server for CONTENT_TYPE:

application/x-www-form-urlencoded

which seems to be correct

Lutz
Lutz
 
Posts: 5276
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Postby eddier » Tue Aug 12, 2003 9:38 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
eddier
 
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Postby Lutz » Tue Aug 12, 2003 11:54 pm

Thanks for the editor tip

Lutz
Lutz
 
Posts: 5276
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests

cron