diff --git a/NEWS b/NEWS index b72e1b6d..613bfdf3 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ NEWS * Enable escaping of % and $ in redirect/rewrite; only two cases changed their behaviour: "%%" => "%", "$$" => "$" * Fix accesslog port (should be port from the connection, not the "server.port") (#1618) * Fix mod_fastcgi prefix matching: match the prefix always against url, not the absolute filepath (regardless of check-local) + * Overwrite Content-Type header in mod_dirlisting instead of inserting (#1614), patch by Henrik Holst - 1.4.19 - 2008-03-10 diff --git a/src/mod_dirlisting.c b/src/mod_dirlisting.c index 50d30464..043f3d6a 100644 --- a/src/mod_dirlisting.c +++ b/src/mod_dirlisting.c @@ -841,11 +841,11 @@ static int http_list_directory(server *srv, connection *con, plugin_data *p, buf /* 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;