In server_get_handler(), body must be a dynamic string.

This commit is contained in:
default 2022-12-13 15:40:59 +01:00
parent 17afbbe4b5
commit a67a82d545

View File

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