summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2010-09-24 12:34:38 +0000
committerhallgren <hallgren@chalmers.se>2010-09-24 12:34:38 +0000
commit8ce7ef3bddc1707f36f62ce62e1cce7781bec63a (patch)
tree2a443a200c6d77b6cae9de82290fdb121ddbdfed /src
parent709b0518fa284b41777cbec015a4647303e7a0b3 (diff)
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">
Diffstat (limited to 'src')
-rw-r--r--src/server/ServeStaticFile.hs12
1 files 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