From d156a4e0babc2e290f3fe79a6d4a8fcf45455e01 Mon Sep 17 00:00:00 2001 From: Meutel Date: Sun, 11 Dec 2016 19:30:55 +0100 Subject: [PATCH] Test env simple --- vars.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vars.c diff --git a/vars.c b/vars.c new file mode 100644 index 0000000..171b52c --- /dev/null +++ b/vars.c @@ -0,0 +1,19 @@ +#include +#include + +int +main(void) +{ + + puts("Status: 200 OK\r"); + puts("Content-Type: text/html\r"); + puts("\r"); + puts(""); + puts(""); + char * var = getenv("HTTP_HOST"); + if (var != NULL) + puts(var); + puts(""); + puts(""); + return(EXIT_SUCCESS); +}