https://bz.apache.org/bugzilla/show_bug.cgi?id=66182

            Bug ID: 66182
           Summary: Old modification dates are wrong when sorting by date
                    ?C=M
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_autoindex
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

mod_autoindex ordinarily reports old file modification dates correctly,
including dates older than 1970.

However, when sorting by date using ?C=M, old dates are incorrectly clamped to
1969.  Instead, signed dates should be sorted correctly and the dates should
not be modified.

In other words, the following line in mod_autoindex is an error and should be
removed:

https://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_autoindex.c?view=markup#l1420

1418    if (keyid == K_LAST_MOD) {
1419            if (p->lm < 0) {
1420                p->lm = 0;
1421            }
1422        }

To reproduce:
(1) touch an file with an old date  `touch -d 1958-01-01 myfile.txt`
(2) view the autoindex listing ordinarily.  Observe the old date is reported.
(3) View the index with ?C=M
(4) Observe that the date is now clamped to 1969.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to