Skip to content

Instantly share code, notes, and snippets.

@billywhizz
Created November 1, 2010 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billywhizz/658527 to your computer and use it in GitHub Desktop.
Save billywhizz/658527 to your computer and use it in GitHub Desktop.
fastcgi test program
#ifndef lint
static const char rcsid[] = "$Id: echo.c,v 1.5 1999/07/28 00:29:37 roberts Exp $";
#endif /* not lint */
#include "fcgi_config.h"
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef _WIN32
#include <process.h>
#else
extern char **environ;
#endif
#include "fcgi_stdio.h"
int main ()
{
char **initialEnv = environ;
int count = 0;
while (FCGI_Accept() >= 0) {
printf("Content-type: text/plain\r\nContent-Length: 10\r\n\r\n0123456789");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment