From 790ff111a684b72f787146bb2edee86380968c23 Mon Sep 17 00:00:00 2001 From: Faizal Hasanwala Date: Fri, 5 Oct 2018 19:13:41 +0530 Subject: [PATCH] Update server.cpp Added Content-Type and Content-Length header in server.cpp --- cpp/server.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cpp/server.cpp b/cpp/server.cpp index 796ffe8..febaf3e 100644 --- a/cpp/server.cpp +++ b/cpp/server.cpp @@ -7,8 +7,10 @@ #define PORT 8000 char *server_message = -"HTTP/1.1 200 OK \n\ -\n\ +"HTTP/1.1 200 OK\r\n\ +Content-Type: text/html; charset=UTF-8\r\n\ +Content-Length: 136\r\n\ +\r\n\ \n\ \n\ Title: Bare Socket\n\ @@ -66,4 +68,4 @@ int main(int argc, char const *argv[]) { close(new_socket); } return 0; -} \ No newline at end of file +}