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

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2018-07-19 21:08:04 +08:00
parent c6441851f6
commit ab5eb4bdae
1 changed files with 2 additions and 2 deletions

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)