From db4a67628d4e4418d01bbba1c8603a6ca8c3562e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 10 Sep 2009 21:24:45 +0200 Subject: networking/httpd_ssi.c: new example CGI handler Signed-off-by: Denys Vlasenko --- networking/httpd_indexcgi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'networking/httpd_indexcgi.c') diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c index 94c6a692a..2605ad1bc 100644 --- a/networking/httpd_indexcgi.c +++ b/networking/httpd_indexcgi.c @@ -28,7 +28,8 @@ httpd_indexcgi.c -o index.cgi /* We don't use printf, as it pulls in >12 kb of code from uclibc (i386). */ /* Currently malloc machinery is the biggest part of libc we pull in. */ /* We have only one realloc and one strdup, any idea how to do without? */ -/* Size (i386, approximate): + +/* Size (i386, static uclibc, approximate): * text data bss dec hex filename * 13036 44 3052 16132 3f04 index.cgi * 2576 4 2048 4628 1214 index.cgi.o @@ -210,7 +211,7 @@ static void fmt_04u(/*char *dst,*/ unsigned n) fmt_02u(n % 100); } -int main(void) +int main(int argc, char *argv[]) { dir_list_t *dir_list; dir_list_t *cdir; @@ -225,6 +226,7 @@ int main(void) QUERY_STRING = getenv("QUERY_STRING"); if (!QUERY_STRING || QUERY_STRING[0] != '/' + || strstr(QUERY_STRING, "//") || strstr(QUERY_STRING, "/../") || strcmp(strrchr(QUERY_STRING, '/'), "/..") == 0 ) { -- cgit v1.2.3