From 09e7a2af00efc69b73cad082f3498e5380272cb0 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sat, 21 Jan 2017 06:40:23 +0000 Subject: [PATCH] Save a few bytes and a few cycles. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1779700 13f79535-47bb-0310-9956-ffa450edef68 --- modules/filters/mod_brotli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/filters/mod_brotli.c b/modules/filters/mod_brotli.c index bea3ec7dd8d..1302a25b6d8 100644 --- a/modules/filters/mod_brotli.c +++ b/modules/filters/mod_brotli.c @@ -443,9 +443,9 @@ static apr_status_t compress_filter(ap_filter_t *f, apr_bucket_brigade *bb) apr_size_t len = strlen(etag); if (len > 2 && etag[len - 1] == '"') { - etag = apr_pstrndup(r->pool, etag, len - 1); + etag = apr_pstrmemdup(r->pool, etag, len - 1); etag = apr_pstrcat(r->pool, etag, "-br\"", NULL); - apr_table_set(r->headers_out, "ETag", etag); + apr_table_setn(r->headers_out, "ETag", etag); } } } -- 2.47.2