I'm been having problems getting a newlisp cgi script to run (using Apache on FreeBSD, I think). When the cgi.lsp runs, it seems to do a (set 'inline (read-line)). This means that it waits for input, doesn't it? And the script was hanging waiting for stdin input.
Anyway, someone suggested "Why don't you check the proper environment variable to see if it's a POST request first? Then if it was a GET, you wouldn't hang reading data from STDIN." A quick bypass like this got basic cgi operations working:
Code: Select all
(if (!= params nil)
(begin
(set 'inline (read-line))
(if inline
(set 'params (get-vars inline)))))
So, how to avoid waiting for read-line yet get any POST requests that are waiting?
Does any of this make sense? :-)