On Sat, Jan 25, 2003 at 09:23:04PM +0000, Francis Daly wrote:

Hi there,

> Part 2, with some optional extras, follows.

IndexResults: the optional extras.

(a) Allow a separate icon for unauthorized files.

(b) Hide some file details unauthorized clients don't need to see.

(c) document (a)

Built against 2.0.44 + the previous IndexResults patch.

The usual amount of presumption regarding version numbers is in the
docs patch -- that can be changed appropriately if it gets committed.

All the best,

        f
-- 
Francis Daly        [EMAIL PROTECTED]

--- modules/generators/mod_autoindex.c  2003-01-25 17:54:28.000000000 +0000
+++ modules/generators/mod_autoindex.c  2003-01-25 17:57:47.000000000 +0000
@@ -1481,6 +1481,11 @@
     p->version_sort = !!(autoindex_opts & VERSION_SORT);
     p->ignore_case = !!(autoindex_opts & IGNORE_CASE);
 
+    /* Change to the "UNAUTHORIZED" icon, if appropriate */
+    if (rr->status == HTTP_UNAUTHORIZED) {
+        rr->filename = "^^UNAUTHORIZED^^";
+    }
+
     if (autoindex_opts & (FANCY_INDEXING | TABLE_INDEXING)) {
         p->lm = rr->finfo.mtime;
         if (dirent->filetype == APR_DIR) {
--- modules/generators/mod_autoindex.c  2003-01-25 17:57:47.000000000 +0000
+++ modules/generators/mod_autoindex.c  2003-01-25 18:00:07.000000000 +0000
@@ -1481,9 +1481,12 @@
     p->version_sort = !!(autoindex_opts & VERSION_SORT);
     p->ignore_case = !!(autoindex_opts & IGNORE_CASE);
 
-    /* Change to the "UNAUTHORIZED" icon, if appropriate */
+    /* Change to the "UNAUTHORIZED" icon, if appropriate.
+     * And conceal details which people don't need until they authenticate */
     if (rr->status == HTTP_UNAUTHORIZED) {
         rr->filename = "^^UNAUTHORIZED^^";
+        rr->finfo.mtime = -1;
+        rr->finfo.size = -1;
     }
 
     if (autoindex_opts & (FANCY_INDEXING | TABLE_INDEXING)) {
--- docs/manual/mod/mod_autoindex.xml   2003-01-25 17:45:21.000000000 +0000
+++ docs/manual/mod/mod_autoindex.xml   2003-01-25 18:01:59.000000000 +0000
@@ -309,7 +309,9 @@
 
     <p><var>Name</var> is either <code>^^DIRECTORY^^</code> for directories,
     <code>^^BLANKICON^^</code> for blank lines (to format the list
-    correctly), a file extension, a wildcard expression, a partial
+    correctly), <code>^^UNAUTHORIZED^^</code> for anything for which
+    the user has not provided appropriate credentials (available from
+    2.0.45), a file extension, a wildcard expression, a partial
     filename or a complete filename.</p>
 
     <example><title>Examples</title>

Reply via email to