packages: lighttpd/lighttpd-mime.types.sh, lighttpd/lighttpd.spec - add cha...
glen
glen at pld-linux.org
Sun Jan 22 21:52:57 CET 2012
Author: glen Date: Sun Jan 22 20:52:57 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- add charset to text content-types; default as utf8
---- Files affected:
packages/lighttpd:
lighttpd-mime.types.sh (1.2 -> 1.3) , lighttpd.spec (1.354 -> 1.355)
---- Diffs:
================================================================
Index: packages/lighttpd/lighttpd-mime.types.sh
diff -u packages/lighttpd/lighttpd-mime.types.sh:1.2 packages/lighttpd/lighttpd-mime.types.sh:1.3
--- packages/lighttpd/lighttpd-mime.types.sh:1.2 Tue Nov 15 14:45:39 2005
+++ packages/lighttpd/lighttpd-mime.types.sh Sun Jan 22 21:52:51 2012
@@ -13,7 +13,19 @@
LC_ALL=C sort -u > mime.types
# build lighttpd.conf fragment
-awk '{ printf("\t\".%s\"%s=> \"%s\",\n", $2, (length($2) > 4 ? "\t" : "\t\t"), $1)}' \
+awk '{
+ ext = $2;
+ type = $1;
+ charset = "";
+ # add charset for "text/*" types
+ if (type ~ "text/") {
+ type = "\"" type "; charset=\" + mimetype_textcharset"
+ } else {
+ type = "\"" type "\""
+ }
+
+ printf("\t\".%s\"%s=> %s,\n", ext, (length(ext) > 4 ? "\t" : "\t\t"), type);
+}' \
< mime.types | LC_ALL=C sort -r > mime.types.conf
# sanity check. there can't be more than one mime type mapping for same extension
@@ -28,6 +40,8 @@
# header
cat >> mime.types.conf <<EOF
+# charset used for "text/*" mimetypes
+mimetype_textcharset = "utf-8"
# mimetype mapping
mimetype.assign = (
EOF
================================================================
Index: packages/lighttpd/lighttpd.spec
diff -u packages/lighttpd/lighttpd.spec:1.354 packages/lighttpd/lighttpd.spec:1.355
--- packages/lighttpd/lighttpd.spec:1.354 Wed Jan 18 13:15:25 2012
+++ packages/lighttpd/lighttpd.spec Sun Jan 22 21:52:51 2012
@@ -30,7 +30,7 @@
Summary(pl.UTF-8): Szybki i lekki serwer HTTP
Name: lighttpd
Version: 1.4.30
-Release: 2
+Release: 3
License: BSD
Group: Networking/Daemons/HTTP
Source0: http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.bz2
@@ -1322,6 +1322,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.355 2012/01/22 20:52:51 glen
+- add charset to text content-types; default as utf8
+
Revision 1.354 2012/01/18 12:15:25 glen
- release 2
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/lighttpd/lighttpd-mime.types.sh?r1=1.2&r2=1.3&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/lighttpd/lighttpd.spec?r1=1.354&r2=1.355&f=u
More information about the pld-cvs-commit
mailing list