commit a67a82d545559c87acf689d70f8c9539e4484e01
parent 17afbbe4b53823e8a7427d64111b7cf8ebcf7f00
Author: default <nobody@localhost>
Date: Tue, 13 Dec 2022 15:40:59 +0100
In server_get_handler(), body must be a dynamic string.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpd.c b/httpd.c
@@ -121,8 +121,8 @@ int server_get_handler(d_char *req, char *q_path,
if (strcmp(q_path, "/robots.txt") == 0) {
status = 200;
*ctype = "text/plain";
- *body = "User-agent: *\n"
- "Disallow: /\n";
+ *body = xs_str_new("User-agent: *\n"
+ "Disallow: /\n");
}
if (status != 0)