diff --git a/trunk/darkhttpd.c b/trunk/darkhttpd.c index 55e883e..6455373 100644 --- a/trunk/darkhttpd.c +++ b/trunk/darkhttpd.c @@ -22,6 +22,8 @@ * x Detect Content-Type from a list of content types. * x Log Referer, User-Agent. * x Ensure URIs requested are safe. + * . Is expand_tilde() even needed? + * . Import new LIST_macros, use FOREACH */ #ifdef __linux @@ -382,18 +384,27 @@ static char *make_safe_uri(const char *uri) else { /* reassemble */ + size_t pos = 0; out = xmalloc(urilen+1); /* it won't expand */ - out[0] = '\0'; - + for (i=0; i `%s'\n", uri, out);