From 46d7f5d2d88a62ed2c77514c33d97e25d737881c Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 27 Nov 2020 20:51:21 +0400 Subject: Added networking --- Web/Response.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Web/Response.hs') diff --git a/Web/Response.hs b/Web/Response.hs index 9bc2179..3c393ad 100644 --- a/Web/Response.hs +++ b/Web/Response.hs @@ -23,8 +23,8 @@ getContent (TextResponse _ _ content) = content formResponse :: Response -> Text formResponse (HtmlResponse code html) = - T.unlines + T.strip $ T.unlines $ map T.pack [ "HTTP/1.1 " ++ getStatus code , "Content-Type: text/html; charset=utf-8" - , "Connection: keep-alive" + , "Connection: close" , "" ] ++ [html] -- cgit v1.2.3