Package: thy
Version: 0.9.4-1.1
Severity: wishlist
Tags: patch
Hi,
as I store my file names as UTF-8, I need thy to add the appropirate
meta header to the directory indexes. Attached is a script that does
that in a configurable way. Info-Documentation updated.
Greetings from DebConf, Helsinki,
Joachim
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.10.otto
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Versions of packages thy depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libgnutls11 1.0.16-13.1 GNU TLS library - runtime library
ii zlib1g 1:1.2.2-8compression library - runtime
thy recommends no packages.
-- no debconf information
diff -ru thy-0.9.4/debian/changelog thy-0.9.4-my/debian/changelog
--- thy-0.9.4/debian/changelog 2005-07-14 16:53:49.789977936 +0300
+++ thy-0.9.4-my/debian/changelog 2005-07-14 15:31:16.589978792 +0300
@@ -1,3 +1,9 @@
+thy (0.9.4-1.1) UNRELEASED; urgency=low
+
+ * Added FileEncoding support
+
+ -- Joachim Breitner [EMAIL PROTECTED] Thu, 14 Jul 2005 15:31:09 +0300
+
thy (0.9.4-1) unstable; urgency=high
* The `Some Other Level' release.
diff -ru thy-0.9.4/doc/thy.texi thy-0.9.4-my/doc/thy.texi
--- thy-0.9.4/doc/thy.texi 2004-10-30 15:06:24.0 +0300
+++ thy-0.9.4-my/doc/thy.texi 2005-07-14 15:51:43.104520240 +0300
@@ -534,6 +534,14 @@
Default is @file{/var/www}.
@end display
[EMAIL PROTECTED],STRING,fileencoding,f,ENCODING}
[EMAIL PROTECTED]
[EMAIL PROTECTED] specifies the character encoding that is used for
+filename.
+
+Default is @samp{iso-8859-1}
[EMAIL PROTECTED] display
+
@cfgopt{ErrorDoc,PAIR,errordoc,e,CODE=PATH}
@display
Set the error-document for @samp{CODE} the file specified with
diff -ru thy-0.9.4/src/cfg_grammar.y thy-0.9.4-my/src/cfg_grammar.y
--- thy-0.9.4/src/cfg_grammar.y 2004-10-30 15:06:24.0 +0300
+++ thy-0.9.4-my/src/cfg_grammar.y 2005-07-14 16:51:41.717447920 +0300
@@ -54,7 +54,7 @@
%token COMMENT ERROR
%token T_BOOL_OFF T_BOOL_ON
-%token T_DOCUMENTROOT T_LISTEN T_DEFAULT_TYPE T_TIMEOUT
+%token T_DOCUMENTROOT T_LISTEN T_DEFAULT_TYPE T_TIMEOUT T_FILEENCODING
%token T_USERDIR T_UID T_PIDFILE T_IPV4 T_IPV6 T_MAP T_INDEXES
%token T_CGIEXTS T_ERRORDOC T_CGIDIRS T_ADDENV T_ADDHANDLER
%token T_ADDMETHOD T_ADDHEADER T_ADDTYPE T_GZIP T_TYPE
@@ -106,6 +106,8 @@
| T_DOCUMENTROOT T_STRING { add_arg (-w, $2); }
+ | T_FILEENCODING T_STRING { add_arg (-f, $2); }
+
| T_LISTEN T_STRING { add_arg (-l, $2); }
| T_IPV4 { bhl_list_append_string (conffile_list, -4); }
| T_IPV6 { bhl_list_append_string (conffile_list, -6); }
diff -ru thy-0.9.4/src/cfg_lexer.l thy-0.9.4-my/src/cfg_lexer.l
--- thy-0.9.4/src/cfg_lexer.l 2004-10-30 15:06:24.0 +0300
+++ thy-0.9.4-my/src/cfg_lexer.l2005-07-14 16:27:23.861075776 +0300
@@ -82,6 +82,7 @@
MaxKeepAliveRequests { return T_MAXKEEPALIVEREQUESTS; }
DocumentRoot { return T_DOCUMENTROOT; }
+FileEncoding { return T_FILEENCODING; }
Listen { return T_LISTEN; }
DefaultType{ return T_DEFAULT_TYPE; }
Timeout{ return T_TIMEOUT; }
diff -ru thy-0.9.4/src/config.c thy-0.9.4-my/src/config.c
--- thy-0.9.4/src/config.c 2004-10-30 15:06:24.0 +0300
+++ thy-0.9.4-my/src/config.c 2005-07-14 16:27:42.595227752 +0300
@@ -145,6 +145,7 @@
{unmap, 'F', NULL, OPTION_HIDDEN, Globalise subsequent options, 1},
{alias, 'A', SOURCE=DEST, 0, Add a new alias, 1},
{cache-control, 'X', FIELD=VALUE, 0, Change cache control options, 1},
+ {fileencoding, 'f', ENCODING, 0, Character encoding of the filenames,
1},
{0, 0, 0, 0, NULL, 0}
};
static error_t _config_parse_opt (int key, char *arg,
@@ -1396,6 +1397,9 @@
if (wl 1 map_cfg-webroot[wl - 1] == '/')
map_cfg-webroot[wl - 1] = '\0';
break;
+case 'f':
+ map_cfg-fileencoding = bhc_strdup (arg);
+break;
case 't':
subopts = arg;
while (*subopts != '\0')
@@ -1489,6 +1493,7 @@
thy_default_config.webroot = _THY_WEBROOT;
thy_default_config.default_type = _THY_DEFTYPE;
thy_default_config.userdir = _THY_USERDIR;
+ thy_default_config.fileencoding = _THY_FILEENCODING;
thy_default_config.options.userdir = THY_BOOL_TRUE;
thy_default_config.options.vhosting = THY_BOOL_FALSE;
@@ -1744,6 +1749,8 @@
cfg-default_type = map-config-default_type;
if (map-config-userdir)
cfg-userdir = map-config-userdir;
+ if (map-config-fileencoding)
+ cfg-fileencoding = map-config-fileencoding;
for (j = HTTP_STATUS_100; j HTTP_STATUS_UNKNOWN; j++)
{
if (map-config-http_status[j])
diff -ru thy-0.9.4/src/dirindex.c thy-0.9.4-my/src/dirindex.c