]> granicus.if.org Git - apache/commitdiff
Merge r1791400 from trunk:
authorEric Covener <covener@apache.org>
Thu, 11 May 2017 17:09:35 +0000 (17:09 +0000)
committerEric Covener <covener@apache.org>
Thu, 11 May 2017 17:09:35 +0000 (17:09 +0000)
mod_substitute: use local/native LF for splitting

On platforms where the APR_ASCII_LF != '\n', like EBCDIC systems,
strmatch or pcre patterns from the source or config will be in
the native encoding, and this module will really only work on
content in the native encoding.

(mod_substitute runs before mod_charset_lite for a similar reason)

I thought #if APR_CHARSET_EBCDIC or even #ifdef __MVS__ was overkill
here.

(CTR due to ebcdic-only)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1794856 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_substitute.c

diff --git a/CHANGES b/CHANGES
index 6a03c3e2cc8e44777486266d25761440fe4d3f02..7d600fce3526bfec713def73a24978540ecc573a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.26
 
+  *) mod_substitute: Fix spurious AH01328 (Line too long) errors on EBCDIC
+     systems.  [Eric Covener]
+
   *) mod_http2: fail requests without ERROR log in case we need to read interim
      responses and see only garbage. This can happen if proxied servers send
      data where none should be, e.g. a body for a HEAD request. [Stefan Eissing]
index 99e82933ba40877f4b55c47b6121a47d8bb33264..d8984ee00615ada33f1db06250c6ba12e2f65f9a 100644 (file)
@@ -452,7 +452,7 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
             else {
                 int num = 0;
                 while (bytes > 0) {
-                    nl = memchr(buff, APR_ASCII_LF, bytes);
+                    nl = memchr(buff, '\n', bytes);
                     if (nl) {
                         len = (apr_size_t) (nl - buff) + 1;
                         /* split *after* the newline */