commit a67a82d
default
·
2022-12-13 14:40:59 +0000 UTC
parent 17afbbe
In server_get_handler(), body must be a dynamic string.
1 files changed,
+2,
-2
M
httpd.c
M
httpd.c
+2,
-2
1@@ -121,8 +121,8 @@ int server_get_handler(d_char *req, char *q_path,
2 if (strcmp(q_path, "/robots.txt") == 0) {
3 status = 200;
4 *ctype = "text/plain";
5- *body = "User-agent: *\n"
6- "Disallow: /\n";
7+ *body = xs_str_new("User-agent: *\n"
8+ "Disallow: /\n");
9 }
10
11 if (status != 0)