Test env simple

This commit is contained in:
Meutel 2016-12-11 19:30:55 +01:00
commit d156a4e0ba

19
vars.c Normal file
View File

@ -0,0 +1,19 @@
#include <stdlib.h>
#include <stdio.h>
int
main(void)
{
puts("Status: 200 OK\r");
puts("Content-Type: text/html\r");
puts("\r");
puts("<html>");
puts("<body>");
char * var = getenv("HTTP_HOST");
if (var != NULL)
puts(var);
puts("</body>");
puts("</html>");
return(EXIT_SUCCESS);
}