mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
WebServer: Add utf-8 charset to Content-Type header for text/plain
This commit is contained in:
parent
45db35ad04
commit
e34f199997
Notes:
sideshowbarker
2024-07-17 14:15:41 +09:00
Author: https://github.com/Xexxa Commit: https://github.com/SerenityOS/serenity/commit/e34f199997 Pull-request: https://github.com/SerenityOS/serenity/pull/13578
@ -176,7 +176,10 @@ ErrorOr<void> 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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user