Project

General

Profile

Feature #136 ยป lighttpd-1.3.13-dir-listing.encoding.diff

http://www.perlfu.co.uk/code/lighttpd/lighttpd-1.3.13-dir-listing.encoding.diff -- critson - Anonymous, 2005-05-22 09:45

View differences:

lighttpd-1.3.13/src/base.h 2005-05-22 09:13:18.142338232 +0000
buffer *error_handler;
buffer *server_tag;
buffer *dirlist_css;
buffer *dirlist_encoding;
unsigned short dir_listing;
unsigned short hide_dotfiles;
lighttpd-1.3.13/src/config.c 2005-05-22 09:13:04.826362568 +0000
{ "dir-listing.hide-dotfiles", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 39 */
{ "dir-listing.external-css", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 40 */
{ "dir-listing.encoding", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 41 */
{ "server.host", "use server.bind instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
{ "server.docroot", "use server.document-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
{ "server.virtual-root", "load mod_simple_vhost and use simple-vhost.server-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
......
s->error_handler = buffer_init();
s->server_tag = buffer_init();
s->dirlist_css = buffer_init();
s->dirlist_encoding = buffer_init();
s->max_keep_alive_requests = 128;
s->max_keep_alive_idle = 30;
s->max_read_idle = 60;
......
cv[38].destination = s->ssl_ca_file;
cv[39].destination = &(s->hide_dotfiles);
cv[40].destination = s->dirlist_css;
cv[41].destination = s->dirlist_encoding;
srv->config_storage[i] = s;
......
PATCH(document_root);
PATCH(dir_listing);
PATCH(dirlist_css);
PATCH(dirlist_encoding);
PATCH(hide_dotfiles);
PATCH(indexfiles);
PATCH(max_keep_alive_requests);
......
PATCH(hide_dotfiles);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("dir-listing.external-css"))) {
PATCH(dirlist_css);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("dir-listing.encoding"))) {
PATCH(dirlist_encoding);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.error-handler-404"))) {
PATCH(error_handler);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.indexfiles"))) {
lighttpd-1.3.13/src/response.c 2005-05-22 09:28:56.051754328 +0000
if (files.used) http_dirls_sort(files.ent, files.used);
out = chunkqueue_get_append_buffer(con->write_queue);
BUFFER_COPY_STRING_CONST(out, "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
if (buffer_is_empty(con->conf.dirlist_encoding)) {
BUFFER_COPY_STRING_CONST(out, "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
} else {
BUFFER_COPY_STRING_CONST(out, "<?xml version=\"1.0\" encoding=\"");
buffer_append_string_buffer(out, con->conf.dirlist_encoding);
BUFFER_APPEND_STRING_CONST(out, "\"?>\n");
}
http_list_directory_header(out, con);
/* directories */
lighttpd-1.3.13/src/server.c 2005-05-22 09:13:28.187811088 +0000
buffer_free(s->ssl_ca_file);
buffer_free(s->error_handler);
buffer_free(s->dirlist_css);
buffer_free(s->dirlist_encoding);
array_free(s->indexfiles);
array_free(s->mimetypes);
    (1-1/1)