-*- coding: utf-8 -*-
Changes with Apache 2.0.56
+ *) mod_mime_magic: Handle CRLF-format magic files so that it works with
+ the default installation on Windows. [Jeff Trawick]
+
*) Write message to error log if AuthGroupFile cannot be opened.
PR 37566. [Rüdiger Plüm]
http://svn.apache.org/viewcvs?view=rev&rev=154319
+1: stoddard, striker, wrowe (as corrected in subsequent patches)
- *) mod_mime_magic: Handle CRLF-format^H^H^H^H^H^H^H magic files
- with any trailing whitespace so that it works with the
- default installation on Windows.
- http://svn.apache.org/viewcvs?rev=179622&view=rev
- http://svn.apache.org/viewcvs?rev=280114&view=rev
- +1: trawick, wrowe, colm
- backported 280114 to 2.2.x branch already
-
*) mod_dav: Fix a null pointer dereference in an error code path during the
handling of MKCOL.
Trunk version of patch:
/* parse it */
for (lineno = 1; apr_file_gets(line, BUFSIZ, f) == APR_SUCCESS; lineno++) {
int ws_offset;
-
- /* delete newline */
- if (line[0]) {
- line[strlen(line) - 1] = '\0';
- }
-
+ char *last = line + strlen(line) - 1; /* guaranteed that len >= 1 since an
+ * "empty" line contains a '\n'
+ */
+
+ /* delete newline and any other trailing whitespace */
+ while (last >= line
+ && apr_isspace(*last)) {
+ *last = '\0';
+ --last;
+ }
+
/* skip leading whitespace */
ws_offset = 0;
while (line[ws_offset] && apr_isspace(line[ws_offset])) {