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:

<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
This commit is contained in:
hallgren
2010-09-24 12:34:38 +00:00
parent 709b0518fa
commit 8ce7ef3bdd

View File

@@ -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"