Changeset 2152

Show
Ignore:
Timestamp:
04/23/2008 01:20:55 PM (6 months ago)
Author:
stbuehler
Message:

Overwrite Content-Type header in mod_dirlisting instead of inserting (#1614), patch by Henrik Holst

Location:
branches/lighttpd-1.4.x
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.4.x/NEWS

    r2150 r2152  
    1818  * Fix accesslog port (should be port from the connection, not the "server.port") (#1618) 
    1919  * Fix mod_fastcgi prefix matching: match the prefix always against url, not the absolute filepath (regardless of check-local) 
     20  * Overwrite Content-Type header in mod_dirlisting instead of inserting (#1614), patch by Henrik Holst 
    2021 
    2122- 1.4.19 - 2008-03-10 
  • branches/lighttpd-1.4.x/src/mod_dirlisting.c

    r1951 r2152  
    842842        /* Insert possible charset to Content-Type */ 
    843843        if (buffer_is_empty(p->conf.encoding)) { 
    844                 response_header_insert(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/html")); 
     844                response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/html")); 
    845845        } else { 
    846846                buffer_copy_string(p->content_charset, "text/html; charset="); 
    847847                buffer_append_string_buffer(p->content_charset, p->conf.encoding); 
    848                 response_header_insert(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(p->content_charset)); 
     848                response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(p->content_charset)); 
    849849        } 
    850850