Created
November 1, 2010 17:18
-
-
Save billywhizz/658527 to your computer and use it in GitHub Desktop.
fastcgi test program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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