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: [email protected]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to