Mod scgi » History » Revision 9
Revision 8 (guidod, 2008-11-23 09:51) → Revision 9/17 (zkv, 2008-11-23 17:17)
h1. [[TracNav(DocsToc)]] <pre> #!rst ================== the SCGI Interface ================== *Module: mod_scgi* ------------------- Module: mod_scgi ------------------- h2. .. meta:: :keywords: lighttpd, FastCGI .. contents:: Table of Contents Description =========== The SCGI module is heavily based on the FastCGI when it comes to configuration. Only the internal protocol between server and client has been replaced. Please check the documentation of the FastCGI module for more information. h2. History ======= Added in lighttpd 1.3.14 as it was really simple to do. </pre> h2. C/C++ *C/C++ SCGI on named socket socket* Up to lightty 1.4.19 there is a bug in that the pre-opened socket handle is not on descriptor 0 (as it is for FastCGI FCGI_LISTENSOCK_FILENO) but any later file descriptor. Since 1.4.20 you can take over your testfastcgi program and replace FCGX_Accept() by a standard Unix accept(LISTENSOCK_FILENO, &addr, &addrlen) - then pthread_create/fork for your handler. The SCGI parameter block at the start of the socket stream is easy to read and to decode - no third-party library is required anymore. Just write() to the accept'ed socket handle to return the result page to the lightty webserver and close() the accept'ed handle to signal that the request has finished.