From 8ce7ef3bddc1707f36f62ce62e1cce7781bec63a Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 24 Sep 2010 12:34:38 +0000 Subject: [PATCH] pgf-server HTTP mode: omit charset from ContentType for static files When pfg-server servers a static file in HTTP mode, it is output as is, so specifying charset="iso-8859-1" could be wrong. Note: the a charset can be specified with a meta tag in HTML files, e.g. for files in UTF-8: --- src/server/ServeStaticFile.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/ServeStaticFile.hs b/src/server/ServeStaticFile.hs index 748cb870d..4e2dd96e0 100644 --- a/src/server/ServeStaticFile.hs +++ b/src/server/ServeStaticFile.hs @@ -15,12 +15,12 @@ serveStaticFile' path = contentTypeFromExt ext = case ext of - ".html" -> "text/html; charset=\"iso8859-1\"" - ".htm" -> "text/html; charset=\"iso8859-1\"" - ".xml" -> "text/xml; charset=\"iso8859-1\"" - ".txt" -> "text/plain; charset=\"iso8859-1\"" - ".css" -> "text/css; charset=\"iso8859-1\"" - ".js" -> "text/javascript; charset=\"iso8859-1\"" + ".html" -> "text/html" + ".htm" -> "text/html" + ".xml" -> "text/xml" + ".txt" -> "text/plain" + ".css" -> "text/css" + ".js" -> "text/javascript" ".png" -> "image/png" ".jpg" -> "image/jpg" _ -> "application/octet-stream" \ No newline at end of file