
Lemmih wrote:
On 6/15/05, Bjorn Bringert
wrote: Graham Klyne wrote:
At 23:06 14/06/05 +0200, Bjorn Bringert wrote:
To the people here who are interested in the CGI module: What do you think of this interface? Could we replace the current Network.CGI with something like this?
I am coming partway into this issue, and may be missing some prior art (or something).
I think a an easy-to-use CGI module would be cool. Your sample code suggests a nice easy-to-use interface. Even cooler would be if it comes with support to hook into Apache's FastCGI module, or similar optimized invocation from Apache. That might inspire me to do some more work on my nascent SPARQL (RDF query) implementation.
Graham, thanks for the suggestion. I went and had a look at FastCGI, and wrote an FFI binding to the fcgiapp C library. You can now use CGI programs with either CGI or FastCGI, using the same interface.
My CGI module is in a darcs repo at: http://www.cs.chalmers.se/~bringert/darcs/haskell-cgi/
The FastCGI module is at: http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi/
I'm having problems building FastCGI. It uses 'runCGIEnv' which isn't exported from Network.NewCGI.
Damn. Sorry. I forgot to push the NewCGI changes needed by FastCGI. Fixed now. There is a problem with FastCGI where Apache gets a broken pipe now and then. I haven't figured it out yet. Network.FastCGI currently also logs a lot of stuff to error_log. So it's not really ready for any use other than experimentation yet. /Björn