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 7b0686bdfa.
This commit is contained in:
Solene Rapenne 2021-03-01 19:35:17 +01:00
parent 7b0686bdfa
commit d086262d1a
1 changed files with 3 additions and 3 deletions

6
main.c
View File

@ -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));