WebServer: Add 'Content-Type' header for error responses

Previously when the WebServer sent an error page the browser would
show the raw HTML since we forgot to send the 'Content-Type' header
This commit is contained in:
Marco Cutecchia 2021-08-24 21:10:58 +02:00 committed by Andreas Kling
parent a501b903b5
commit 0ae5de8c3c
Notes: sideshowbarker 2024-07-18 05:19:15 +09:00

View File

@ -288,6 +288,7 @@ void Client::send_error_response(unsigned code, HTTP::HttpRequest const& request
builder.append(header);
builder.append("\r\n");
}
builder.append("Content-Type: text/html; charset=UTF-8\r\n");
builder.append("\r\n");
builder.append("<!DOCTYPE html><html><body><h1>");