I am writing a web server in C, and I need to figure out a way to use CGI to execute dynamic server-side content.
I am watching FastCGI protocol and it looks annoying. This reminds me of what I had to do in class when I converted ASCII to UTF-8 and vice versa (it seemed useless, but maybe it wasn’t).
I found a large library written in PHP, where I could just run php-cgi -b localhost:8888 and start talking to it. Obviously, I would like to in C.
I would appreciate if anyone could find a library (for FastCGI clients!). If not, then I'm fine with the open source community by writing one.
Also, how exactly do I use SCGI? There is virtually no documentation (that I can find, anyway). What socket am I connecting to? Where can I send requests?
In addition, php-cgi is only for PHP, so how does it work for Perl, Python, etc.
Thanks again.
source share