Преглед изворни кода

Fixed check for the basedir (contributed by an-im-dugud).

default пре 3 месеци
родитељ
комит
4416e3a28a
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      httpd.c

+ 1 - 1
httpd.c

@@ -212,7 +212,7 @@ int server_get_handler(xs_dict *req, const char *q_path,
     int status = 0;
 
     /* is it the server root? */
-    if (*q_path == '\0') {
+    if (*q_path == '\0' || strcmp(q_path, "/") == 0) {
         const xs_dict *q_vars = xs_dict_get(req, "q_vars");
         const char *t = NULL;