From a67a82d545559c87acf689d70f8c9539e4484e01 Mon Sep 17 00:00:00 2001 From: default Date: Tue, 13 Dec 2022 15:40:59 +0100 Subject: In server_get_handler(), body must be a dynamic string. --- httpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httpd.c') diff --git a/httpd.c b/httpd.c index e05a0c2..f85188c 100644 --- 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) -- cgit v1.2.3