dgaudet 97/09/25 19:59:11
Modified: src CHANGES
src/modules/standard mod_autoindex.c
Log:
1) Entity Names (like ü) are parsed and counted as having a width
of "one character". Until now, their length was taken in column
counting, resulting in too early truncated description columns.
2) The last character of a description text which had the maximum
allowed length (27?) was overwritten with the "truncated" character
('>'). This didn't make the string any shorter, but made it
unreadable :-( Now the string is truncated only if it really
exceeds the maximum length.
Submitted by: Martin Kraemer
Reviewed by: Dean Gaudet, Jim Jagielski, Roy Fielding
Revision Changes Path
1.446 +5 -0 apachen/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apachen/src/CHANGES,v
retrieving revision 1.445
retrieving revision 1.446
diff -u -r1.445 -r1.446
--- CHANGES 1997/09/26 02:56:39 1.445
+++ CHANGES 1997/09/26 02:59:07 1.446
@@ -1,5 +1,10 @@
Changes with Apache 1.3b1
+ *) mod_autoindex improperly counted &escapes; as more than one
+ character in the description. It also improperly truncated
+ descriptions that were exactly the maximum length.
+ [Martin Kraemer]
+
*) RedirectMatch was not properly escaping the result (PR#1155). Also
"RedirectMatch /advertiser/(.*) $1" is now permitted.
[Dean Gaudet]
1.49 +11 -1 apachen/src/modules/standard/mod_autoindex.c
Index: mod_autoindex.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- mod_autoindex.c 1997/09/18 08:12:22 1.48
+++ mod_autoindex.c 1997/09/26 02:59:10 1.49
@@ -716,10 +716,20 @@
++x;
}
}
+ else if (desc[x] == '&') {
+ /* entities like ä count as one character */
+ --maxsize;
+ for ( ; desc[x] != ';'; ++x) {
+ if (desc[x] == '\0') {
+ maxsize = 0;
+ break;
+ }
+ }
+ }
else
--maxsize;
}
- if (!maxsize) {
+ if (!maxsize && desc[x] != '\0') {
desc[x - 1] = '>'; /* Grump. */
desc[x] = '\0'; /* Double Grump! */
}