Index: mod_autoindex.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/generators/mod_autoindex.c,v
retrieving revision 1.112.2.7
diff -u -r1.112.2.7 mod_autoindex.c
--- mod_autoindex.c     27 Sep 2003 18:34:56 -0000      1.112.2.7
+++ mod_autoindex.c     20 Nov 2003 02:38:34 -0000
@@ -158,6 +158,7 @@
 typedef struct autoindex_config_struct {

     char *default_icon;
+    char *style_sheet;
     apr_int32_t opts;
     apr_int32_t incremented_opts;
     apr_int32_t decremented_opts;
@@ -192,9 +193,18 @@
  */
 static void emit_preamble(request_rec *r, char *title)
 {
+    autoindex_config_rec *d;
+
+    d = (autoindex_config_rec *) ap_get_module_config(r->per_dir_config,
+                                                      &autoindex_module);
     ap_rvputs(r, DOCTYPE_HTML_3_2,
               "<html>\n <head>\n  <title>Index of ", title,
-              "</title>\n </head>\n <body>\n", NULL);
+              "</title>\n ", NULL);
+    if (d->style_sheet != NULL) {
+        ap_rvputs(r, "  <link rel=\"stylesheet\" href=\"", d->style_sheet,
+                  "\" type=\"text/css\">\n",NULL);
+    }
+    ap_rvputs(r,"</head>\n <body>\n", NULL);
 }

 static void push_item(apr_array_header_t *arr, char *type, const char *to,
@@ -595,6 +605,9 @@
     AP_INIT_TAKE1("DefaultIcon", ap_set_string_slot,
                   (void *)APR_OFFSETOF(autoindex_config_rec, default_icon),
                   DIR_CMD_PERMS, "an icon URL"),
+    AP_INIT_TAKE1("IndexStyleSheet", ap_set_string_slot,
+                  (void *)APR_OFFSETOF(autoindex_config_rec, style_sheet),
+                  DIR_CMD_PERMS, "URL to style sheet""),
     {NULL}
 };

@@ -633,6 +646,8 @@
     new = (autoindex_config_rec *) apr_pcalloc(p, sizeof(autoindex_config_rec));
     new->default_icon = add->default_icon ? add->default_icon
                                           : base->default_icon;
+    new->style_sheet = add->style_sheet ? add->style_sheet
+                                          : base->style_sheet;
     new->icon_height = add->icon_height ? add->icon_height : base->icon_height;
     new->icon_width = add->icon_width ? add->icon_width : base->icon_width;


