httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45700] New: incorrect sort order in autoindex with non-ASCII sequences and VersionSort option.
Date Thu, 28 Aug 2008 04:37:54 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45700

           Summary: incorrect sort order in autoindex with non-ASCII
                    sequences and VersionSort option.
           Product: Apache httpd-2
           Version: 2.2.9
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: sumita12+apache@gmail.com


Created an attachment (id=22489)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22489)
patch for this issue. (for srclib/apr/strings/apr_strnatcmp.c)

if "IndexOptions VersionSort" is enabled, sort order in autoindex is incorrect
with non-ASCII filename.

usually non-ASCII characters is bigger than ASCII characters by strcmp().
but if VersionSort option is enabled, ASCII is bigger than non-ASCII.

for example,
"foo.txt" < "ほげ.txt"  if this option is disabled.
"foo.txt" > "ほげ.txt"  if this option is enabled.

the cause of this issue is "apr_strnatcmp0()" in "apr_strnatcmp.c".
this function treat sequences as "char const *".
but we should this as "unsigned char const *" in a normal situation. (e.g. C
function strcmp())

I wrote a patch for this issue.
please see and marge this one.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message