www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kestutis Kupciunas <ke...@soften.ktu.lt>
Subject mod_autoindex/8771: sorting misbehaves when direction is not given
Date Fri, 16 Nov 2001 09:54:34 GMT

>Number:         8771
>Category:       mod_autoindex
>Synopsis:       sorting misbehaves when direction is not given
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Nov 16 02:00:00 PST 2001
>Originator:     kesha@soften.ktu.lt
>Release:        1.3.22
Linux kibiras 2.2.19 #1 Fri Jun 8 13:30:13 EET 2001 i686 unknown
gcc version 2.95.4 20011006 (Debian prerelease)
if one uses sorting ability of the mod_autoindex without a direction (eg. ?N=),
mod_autoindex sorts in descending order, however the source of mod_autoindex
has a little bug, which prevents doing that. Fix is more than simple, see the patch.
give ?N= parameter for the directory and see how it is sorted in descending order (instead
of ascending).
--- mod_autoindex.c.orig        Fri Nov 16 10:12:33 2001
+++ mod_autoindex.c     Fri Nov 16 10:13:07 2001
@@ -1673,7 +1673,7 @@
     else {
        keyid = *qstring;
        ap_getword(r->pool, &qstring, '=');
-       if (qstring != '\0') {
+       if (*qstring != '\0') {
            direction = *qstring;
        else {
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message