]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1874346, r1874545, r1874558 from trunk:
authorEric Covener <covener@apache.org>
Fri, 6 Mar 2020 01:14:16 +0000 (01:14 +0000)
committerEric Covener <covener@apache.org>
Fri, 6 Mar 2020 01:14:16 +0000 (01:14 +0000)
Avoid printing NULL strings in logs

Avoid printing NULL strings in logs

"?:" is a GNU extension, use standard syntax
spotted by Christophe Jaillet

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

modules/filters/mod_brotli.c
modules/filters/mod_deflate.c

index d1d7044ac8f3b697f629c4788923ccacd506b317..0f7d770b6705fa485270c563b8a145f9f6e024b9 100644 (file)
@@ -419,7 +419,7 @@ static apr_status_t compress_filter(ap_filter_t *f, apr_bucket_brigade *bb)
             }
             q = ap_get_token(r->pool, &accepts, 1);
             ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
-                          "token: '%s' - q: '%s'", token, q);
+                          "token: '%s' - q: '%s'", token ? token : "NULL", q);
         }
 
         /* No acceptable token found or q=0 */
index b079709a26c0467f31a878c4ca2354e624ef1292..00ab23c499bf1d2ddc6e07b189b919f139b9d83a 100644 (file)
@@ -730,7 +730,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
                 }
                 q = ap_get_token(r->pool, &accepts, 1);
                 ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
-                              "token: '%s' - q: '%s'", token, q);
+                              "token: '%s' - q: '%s'", token ? token : "NULL", q);
             }
 
             /* No acceptable token found or q=0 */