[LON-CAPA-cvs] cvs: loncom /cgi loncgi.pm
raeburn
raeburn at source.lon-capa.org
Tue Oct 14 15:54:00 EDT 2014
raeburn Tue Oct 14 19:54:00 2014 EDT
Modified files:
/loncom/cgi loncgi.pm
Log:
- Bug 6748 loncgi::cgi_header()
- Set charset to utf-8 in content header for content types text/html,
text/plain and text/xml.
Index: loncom/cgi/loncgi.pm
diff -u loncom/cgi/loncgi.pm:1.13 loncom/cgi/loncgi.pm:1.14
--- loncom/cgi/loncgi.pm:1.13 Mon May 13 01:26:54 2013
+++ loncom/cgi/loncgi.pm Tue Oct 14 19:54:00 2014
@@ -1,7 +1,7 @@
#
# LON-CAPA helpers for cgi-bin scripts
#
-# $Id: loncgi.pm,v 1.13 2013/05/13 01:26:54 raeburn Exp $
+# $Id: loncgi.pm,v 1.14 2014/10/14 19:54:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -246,6 +246,9 @@
if ($contenttype ne '') {
if ($mimetypes->type($contenttype) ne '') {
$headers{'-type'} = $contenttype;
+ if ($contenttype =~ m{^text/}) {
+ $headers{'-charset'} = 'utf-8';
+ }
}
}
if ($nocache) {
More information about the LON-CAPA-cvs
mailing list