libuhttpd: Fix bug: Can't set docroot and index file

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Jianhui Zhao committed 2018-07-19 21:08:04 +08:00
1 parent c6441851f6
commit ab5eb4bdae
1 file changed
+2 -2
+2 -2
View File
@@ -29,13 +29,13 @@
static void uh_set_docroot(struct uh_server *srv, const char *docroot)
{
free(srv->docroot);
srv->docroot = strdup(".");
srv->docroot = strdup(docroot);
}
static void uh_set_index_file(struct uh_server *srv, const char *index_file)
{
free(srv->index_file);
srv->index_file = strdup("index.html");
srv->index_file = strdup(index_file);
}
static void uh_server_free(struct uh_server *srv)