You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
484 B
C
27 lines
484 B
C
19 years ago
|
#include <fcgi_stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <unistd.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main () {
|
||
|
char* p;
|
||
|
|
||
|
while (FCGI_Accept() >= 0) {
|
||
|
/* wait for fastcgi authorizer request */
|
||
|
|
||
|
printf("Content-type: text/html\r\n");
|
||
|
|
||
|
if (((p = getenv("QUERY_STRING")) == NULL) ||
|
||
|
strcmp(p, "ok") != 0) {
|
||
|
printf("Status: 403 Forbidden\r\n\r\n");
|
||
|
} else {
|
||
|
printf("\r\n");
|
||
|
/* default Status is 200 - allow access */
|
||
|
}
|
||
|
|
||
|
printf("foobar\r\n");
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|