lighttpd 1.4.x
https://www.lighttpd.net/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
664 B
32 lines
664 B
#include "first.h" |
|
|
|
#if defined(HAVE_FASTCGI_FCGI_STDIO_H) |
|
# include <fastcgi/fcgi_stdio.h> |
|
#elif defined(HAVE_FCGI_STDIO_H) |
|
# include <fcgi_stdio.h> |
|
#else |
|
# error Missing fcgi_stdio.h |
|
#endif |
|
|
|
#include <stdlib.h> |
|
#include <string.h> |
|
|
|
int main (void) { |
|
|
|
while (FCGI_Accept() >= 0) { |
|
|
|
/* Status: 200 OK to allow access is implied |
|
* if Status header is not included in response */ |
|
|
|
char *p = getenv("QUERY_STRING"); |
|
if (p != NULL && 0 == strcmp(p, "var")) { |
|
printf("Variable-X-LIGHTTPD-FCGI-AUTH: LighttpdTestContent\r\n"); |
|
} else if (p == NULL || 0 != strcmp(p, "ok")) { |
|
printf("Status: 403 Forbidden\r\n"); |
|
} |
|
|
|
printf("\r\n"); |
|
} |
|
|
|
return 0; |
|
}
|
|
|