From 7b0686bdfa5bac295c250128fb2021fcaec4cd49 Mon Sep 17 00:00:00 2001 From: Solene Rapenne Date: Sat, 27 Feb 2021 19:59:28 +0100 Subject: [PATCH] empty request should works all the time, not only when in virtualhost --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 29e55e3..f5aaa32 100644 --- a/main.c +++ b/main.c @@ -435,10 +435,10 @@ main(int argc, char **argv) * hostname directory gemini://foobar/hello will look for * chroot_path/foobar/hello */ + if (strlen(uri) == 0) { + estrlcpy(uri, "/index.gmi", sizeof(uri)); + } if (virtualhost) { - if (strlen(uri) == 0) { - estrlcpy(uri, "/index.gmi", sizeof(uri)); - } char tmp[PATH_MAX] = {'\0'}; estrlcpy(tmp, hostname, sizeof(tmp)); estrlcat(tmp, uri, sizeof(tmp));