]> granicus.if.org Git - apache/commitdiff
mod_substitute: use local/native LF for splitting
authorEric Covener <covener@apache.org>
Fri, 14 Apr 2017 19:38:34 +0000 (19:38 +0000)
committerEric Covener <covener@apache.org>
Fri, 14 Apr 2017 19:38:34 +0000 (19:38 +0000)
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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1791400 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_substitute.c

diff --git a/CHANGES b/CHANGES
index 9df60bb0f8b57d09cb33eca976a5a296ac0a304d..4b91eb2b6c71a43f1745c882f743203e08997213 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_substitute: Fix spurious AH01328 (Line too long) errors on EBCDIC
+     systems.  [Eric Covener]
+
   *) mod_http2: client streams that lack the EOF flag get now forcefully
      closed with a RST_STREAM (NO_ERROR) when the request has been answered.
      [Stefan Eissing]     
index b366cb3250ea69e01ab20e694dbd956e9836605b..d6d031211c4d6adb393251079a950502de60547e 100644 (file)
@@ -453,7 +453,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 */