From: Christophe Jaillet Date: Sat, 21 Jan 2017 06:40:23 +0000 (+0000) Subject: Save a few bytes and a few cycles. X-Git-Tag: 2.5.0-alpha~766 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09e7a2af00efc69b73cad082f3498e5380272cb0;p=thirdparty%2Fapache%2Fhttpd.git 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 --- 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); } } }