2016-12-11 18:30:55 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int
|
2016-12-11 18:38:55 +00:00
|
|
|
main(int argc, char **argv, char** envp)
|
2016-12-11 18:30:55 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
puts("Status: 200 OK\r");
|
|
|
|
puts("Content-Type: text/html\r");
|
|
|
|
puts("\r");
|
|
|
|
puts("<html>");
|
|
|
|
puts("<body>");
|
2016-12-11 18:38:55 +00:00
|
|
|
puts("<h1>Env</h1>");
|
|
|
|
puts("<ul>");
|
|
|
|
char** env;
|
|
|
|
for (env = envp; *env != 0; env++)
|
|
|
|
{
|
|
|
|
puts("<li>");
|
|
|
|
puts(*env);
|
|
|
|
puts("</li>");
|
|
|
|
}
|
|
|
|
puts("</ul>");
|
|
|
|
puts("<h1>Args</h1>");
|
|
|
|
puts("<ul>");
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < argc; i++) {
|
|
|
|
puts("<li>");
|
|
|
|
puts(argv[i]);
|
|
|
|
puts("</li>");
|
|
|
|
}
|
|
|
|
puts("</ul>");
|
|
|
|
puts("</body>");
|
|
|
|
puts("</html>");
|
|
|
|
return(EXIT_SUCCESS);
|
2016-12-11 18:30:55 +00:00
|
|
|
}
|