You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/08/28 06:37:54 UTC

DO NOT REPLY [Bug 45700] New: incorrect sort order in autoindex with non-ASCII sequences and VersionSort option.

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


DO NOT REPLY [Bug 45700] incorrect sort order in autoindex with non-ASCII sequences and VersionSort option.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45700


Hiroshi Sumita <su...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22489|0                           |1
        is obsolete|                            |




--- Comment #1 from Hiroshi Sumita <su...@gmail.com>  2008-08-28 01:59:02 PST ---
Created an attachment (id=22491)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22491)
patch for this issue. [srclib/apr/strings/apr_strnatcmp.c]


-- 
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


DO NOT REPLY [Bug 45700] incorrect sort order of apr_strnatcmp with non-ASCII sequences

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45700


Takashi Sato <ta...@lans-tv.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |takashi@lans-tv.com
          Component|All                         |APR
           Keywords|                            |PatchAvailable
            Product|Apache httpd-2              |APR
            Summary|incorrect sort order in     |incorrect sort order of
                   |autoindex with non-ASCII    |apr_strnatcmp with non-ASCII
                   |sequences and VersionSort   |sequences
                   |option.                     |
            Version|2.2.9                       |HEAD




-- 
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


DO NOT REPLY [Bug 45700] incorrect sort order of apr_strnatcmp with non-ASCII sequences

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45700


Takashi Sato <ta...@lans-tv.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bugs@httpd.apache.org       |bugs@apr.apache.org




-- 
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