From 0e2f6403e711ef1f31fdfaedb62c9b41dacad5e6 Mon Sep 17 00:00:00 2001 From: Meutel Date: Sun, 11 Dec 2016 19:38:55 +0100 Subject: [PATCH] Display env and args --- vars.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/vars.c b/vars.c index 171b52c..1f7f50c 100644 --- a/vars.c +++ b/vars.c @@ -2,7 +2,7 @@ #include int -main(void) +main(int argc, char **argv, char** envp) { puts("Status: 200 OK\r"); @@ -10,10 +10,26 @@ main(void) puts("\r"); puts(""); puts(""); - char * var = getenv("HTTP_HOST"); - if (var != NULL) - puts(var); - puts(""); - puts(""); - return(EXIT_SUCCESS); + puts("

Env

"); + puts(""); + puts("

Args

"); + puts(""); + puts(""); + puts(""); + return(EXIT_SUCCESS); }