Project

General

Profile

Bug #1614 ยป mod_dirlisting.c.patch

HenrikHolst, 2008-03-27 10:05

View differences:

mod_dirlisting.c (working copy)
/* Insert possible charset to Content-Type */
if (buffer_is_empty(p->conf.encoding)) {
response_header_insert(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/html"));
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/html"));
} else {
buffer_copy_string(p->content_charset, "text/html; charset=");
buffer_append_string_buffer(p->content_charset, p->conf.encoding);
response_header_insert(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(p->content_charset));
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(p->content_charset));
}
con->file_finished = 1;
    (1-1/1)