From d086262d1afa1836e29543bcf44df564e40ca94a Mon Sep 17 00:00:00 2001 From: Solene Rapenne Date: Mon, 1 Mar 2021 19:35:17 +0100 Subject: [PATCH] Revert "empty request should works all the time, not only when in virtualhost" This broke vger from inetd but it passed the tests. This reverts commit 7b0686bdfa5bac295c250128fb2021fcaec4cd49. --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index f5aaa32..29e55e3 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));