diff --git a/Userland/Services/WebServer/Client.cpp b/Userland/Services/WebServer/Client.cpp index d8675f2547..72e7ae5ab1 100644 --- a/Userland/Services/WebServer/Client.cpp +++ b/Userland/Services/WebServer/Client.cpp @@ -176,7 +176,10 @@ ErrorOr Client::send_response(InputStream& response, HTTP::HttpRequest con builder.append("X-Frame-Options: SAMEORIGIN\r\n"); builder.append("X-Content-Type-Options: nosniff\r\n"); builder.append("Pragma: no-cache\r\n"); - builder.appendff("Content-Type: {}\r\n", content_info.type); + if (content_info.type == "text/plain") + builder.appendff("Content-Type: {}; charset=utf-8\r\n", content_info.type); + else + builder.appendff("Content-Type: {}\r\n", content_info.type); builder.appendff("Content-Length: {}\r\n", content_info.length); builder.append("\r\n");