post method

Q&A's, tips, howto's
Post Reply
eddier
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

post method

Post by eddier »

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

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

Post by Lutz »

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: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

I get on my server for CONTENT_TYPE:

application/x-www-form-urlencoded

which seems to be correct

Lutz

eddier
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Post by eddier »

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

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

Post by Lutz »

Thanks for the editor tip

Lutz

Post Reply