diff --git a/src/cfgparse.c b/src/cfgparse.c
index cfca6c9a2..bd345b216 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -53,6 +53,7 @@ const char *HTTP_400 =
"HTTP/1.0 400 Bad request\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n"
"
400 Bad request
\nYour browser sent an invalid request.\n\n";
@@ -60,6 +61,7 @@ const char *HTTP_403 =
"HTTP/1.0 403 Forbidden\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n"
"403 Forbidden
\nRequest forbidden by administrative rules.\n\n";
@@ -67,6 +69,7 @@ const char *HTTP_408 =
"HTTP/1.0 408 Request Time-out\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n"
"408 Request Time-out
\nYour browser didn't send a complete request in time.\n\n";
@@ -74,6 +77,7 @@ const char *HTTP_500 =
"HTTP/1.0 500 Server Error\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n"
"500 Server Error
\nAn internal server error occured.\n\n";
@@ -81,6 +85,7 @@ const char *HTTP_502 =
"HTTP/1.0 502 Bad Gateway\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n"
"502 Bad Gateway
\nThe server returned an invalid or incomplete response.\n\n";
@@ -88,6 +93,7 @@ const char *HTTP_503 =
"HTTP/1.0 503 Service Unavailable\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n"
"503 Service Unavailable
\nNo server is available to handle this request.\n\n";
@@ -95,6 +101,7 @@ const char *HTTP_504 =
"HTTP/1.0 504 Gateway Time-out\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n"
"504 Gateway Time-out
\nThe server didn't respond in time.\n\n";
diff --git a/src/proto_http.c b/src/proto_http.c
index 0c24a05a1..e1a7d1734 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -55,6 +55,7 @@ const char *HTTP_401_fmt =
"HTTP/1.0 401 Unauthorized\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"WWW-Authenticate: Basic realm=\"%s\"\r\n"
"\r\n"
"401 Unauthorized
\nYou need a valid user and password to access this content.\n\n";
@@ -2392,6 +2393,7 @@ int produce_content(struct session *s)
"HTTP/1.0 200 OK\r\n"
"Cache-Control: no-cache\r\n"
"Connection: close\r\n"
+ "Content-Type: text/html\r\n"
"\r\n\r\n");
s->logs.status = 200;