[Xitami] GET from cgi-bin directory

Thomas J. Hruska xitami@lists.xitami.org
Mon, 17 Jun 2002 10:03:00 -0400


At 09:42 PM 6/16/2002 +0200, Jan de Lint writeth:
>I noticed that not only a POST to /cgi-bin/somecgi.exe is granted but als a
>GET request.
>Should I improve my configuration? Using version 2.4d9.

Actually, I have noticed strange behavior on some machines with the
HINTERNET API (which both IE and Netscape use) where a single request will
actually request the same page twice.  POST is even worse since that API
will first send a POST shortly followed by a GET request (without the POST
data).  This confused me for ages trying to figure out why I was getting
two entries in some database table, one blank, the other had data.

If you want to restrict 'somecgi.exe' to only accept POST requests, then
you need to use getenv("REQUEST_METHOD") in your program and compare the
value to "POST".

Hope this helps!


Thomas J. Hruska -- shinelight@shininglightpro.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
http://www.shininglightpro.com/