Ticket #1614: mod_dirlisting.c.patch

File mod_dirlisting.c.patch, 0.8 kB (added by HenrikHolst, 5 months ago)
  • mod_dirlisting.c

     
    841841 
    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 
    851851        con->file_finished = 1;