Created
September 19, 2017 08:25
-
-
Save kb10uy/4a4804e2d3a0fa35f2c93b81a0931e66 to your computer and use it in GitHub Desktop.
mpywd - Homo Redirect FCGI
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
/* compile: gcc -o mpywd -lfcgi mpywd.c */ | |
#include <stdio.h> | |
#include <fcgi_config.h> | |
#include <fcgi_stdio.h> | |
int main(void) { | |
while (FCGI_Accept() >= 0) { | |
printf("Content-Type: text/html\n"); | |
printf("Status: 302 Found\n"); | |
printf("Location: https://twitter.com/mpyw\n"); | |
printf("\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment