Received: (qmail 6223 invoked by uid 501); 16 Nov 2001 09:54:34 -0000 Message-Id: <20011116095434.6222.qmail@apache.org> Date: 16 Nov 2001 09:54:34 -0000 From: Kestutis Kupciunas Reply-To: kesha@soften.ktu.lt To: submit@bugz.apache.org Subject: sorting misbehaves when direction is not given X-Send-Pr-Version: 3.110 >Number: 8771 >Category: mod_autoindex >Synopsis: sorting misbehaves when direction is not given >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Nov 16 02:00:00 PST 2001 >Closed-Date: Fri Nov 16 19:41:25 PST 2001 >Last-Modified: Fri Nov 16 19:41:25 PST 2001 >Originator: kesha@soften.ktu.lt >Release: 1.3.22 >Organization: >Environment: Linux kibiras 2.2.19 #1 Fri Jun 8 13:30:13 EET 2001 i686 unknown gcc version 2.95.4 20011006 (Debian prerelease) >Description: 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. >How-To-Repeat: give ?N= parameter for the directory and see how it is sorted in descending order (instead of ascending). >Fix: --- 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 { >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: wrowe State-Changed-When: Fri Nov 16 19:41:25 PST 2001 State-Changed-Why: ++paranoia, but applied, thank you! >Unformatted: [In order for any reply to be added to the PR database, you need] [to include 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! ]