[FASTCGI] New functions for parsing get & post requests

Kuzin Andrey kuzinandrey at yandex.ru
Sat Mar 28 13:09:34 EDT 2009


Hello list ! I'm a new member.

I use fastcgi in built-in admin page for my pthreads
application. Library don't have any functions for
processing get & post requests and i decide to
write some of them.
I think it will be very useful for all library users.


Example of usage:
=========================
FCGX_Request request;
const char *cs, *cs1, *cs2;
....

FCGX_InitRequest(&request, fastcgi_socket, 0);
for (;;)
{
   pthread_mutex_lock(&accept_mutex);
   rc = FCGX_Accept_r(&request);
   pthread_mutex_unlock(&accept_mutex);
 
   // this is my new function
   FCGX_PrepareRequestVars(&request);

   // find "list" in QUERY_STRING for GET request
   cs1 = FCGX_GetParam("list", request.getp);

   // find "list" in POST request
   cs2 = FCGX_GetParam("list", request.postp);

   .....
   FCGX_Finish_r(&request);
   continue;
};

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Kuzin Andrey  -  kuzinandrey at yandex.ru
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcgiapp-h.patch
Type: application/octet-stream
Size: 1234 bytes
Desc: not available
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20090328/a0c06694/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcgiapp-c.patch
Type: application/octet-stream
Size: 4069 bytes
Desc: not available
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20090328/a0c06694/attachment-0001.obj>


More information about the FastCGI-developers mailing list