View | Details | Raw Unified | Return to bug 153557
Collapse All | Expand All

(-)httpd-2.2.3.orig/modules/generators/mod_autoindex.c (-5 / +15 lines)
Lines 130-135 Link Here
130
    int icon_height;
130
    int icon_height;
131
    char default_keyid;
131
    char default_keyid;
132
    char default_direction;
132
    char default_direction;
133
    char *fs_charset;
133
134
134
    apr_array_header_t *icon_list;
135
    apr_array_header_t *icon_list;
135
    apr_array_header_t *alt_list;
136
    apr_array_header_t *alt_list;
Lines 556-561 Link Here
556
    AP_INIT_ITERATE2("AddAltByEncoding", add_alt, BY_ENCODING, DIR_CMD_PERMS,
557
    AP_INIT_ITERATE2("AddAltByEncoding", add_alt, BY_ENCODING, DIR_CMD_PERMS,
557
                     "alternate descriptive text followed by one or more "
558
                     "alternate descriptive text followed by one or more "
558
                     "content encodings"),
559
                     "content encodings"),
560
    AP_INIT_TAKE1("AddDirectoryIndexCharset", ap_set_string_slot,
561
                  (void *)APR_OFFSETOF(autoindex_config_rec, fs_charset),
562
                  DIR_CMD_PERMS, "alternative encoding of filenames, if not utf-8"),
559
    AP_INIT_TAKE_ARGV("IndexOptions", add_opts, NULL, DIR_CMD_PERMS,
563
    AP_INIT_TAKE_ARGV("IndexOptions", add_opts, NULL, DIR_CMD_PERMS,
560
                      "one or more index options [+|-][]"),
564
                      "one or more index options [+|-][]"),
561
    AP_INIT_TAKE2("IndexOrderDefault", set_default_order, NULL, DIR_CMD_PERMS,
565
    AP_INIT_TAKE2("IndexOrderDefault", set_default_order, NULL, DIR_CMD_PERMS,
Lines 617-622 Link Here
617
                                          : base->default_icon;
621
                                          : base->default_icon;
618
    new->style_sheet = add->style_sheet ? add->style_sheet
622
    new->style_sheet = add->style_sheet ? add->style_sheet
619
                                          : base->style_sheet;
623
                                          : base->style_sheet;
624
    new->fs_charset = add->fs_charset ? add->fs_charset
625
                                          : base->fs_charset;
620
    new->icon_height = add->icon_height ? add->icon_height : base->icon_height;
626
    new->icon_height = add->icon_height ? add->icon_height : base->icon_height;
621
    new->icon_width = add->icon_width ? add->icon_width : base->icon_width;
627
    new->icon_width = add->icon_width ? add->icon_width : base->icon_width;
622
628
Lines 1978-1988 Link Here
1978
        return HTTP_FORBIDDEN;
1984
        return HTTP_FORBIDDEN;
1979
    }
1985
    }
1980
1986
1981
#if APR_HAS_UNICODE_FS
1987
    if (autoindex_conf->fs_charset != NULL) {
1982
    ap_set_content_type(r, "text/html;charset=utf-8");
1988
        ap_set_content_type(r, apr_pstrcat(r->pool,
1983
#else
1989
                                           "text/html;charset=",
1984
    ap_set_content_type(r, "text/html");
1990
                                           autoindex_conf->fs_charset,
1985
#endif
1991
                                           NULL));
1992
    } else {
1993
        ap_set_content_type(r, "text/html;charset=utf-8");
1994
    }
1995
1986
    if (autoindex_opts & TRACK_MODIFIED) {
1996
    if (autoindex_opts & TRACK_MODIFIED) {
1987
        ap_update_mtime(r, r->finfo.mtime);
1997
        ap_update_mtime(r, r->finfo.mtime);
1988
        ap_set_last_modified(r);
1998
        ap_set_last_modified(r);

Return to bug 153557