]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Save a few bytes and a few cycles.
authorChristophe Jaillet <jailletc36@apache.org>
Sat, 21 Jan 2017 06:40:23 +0000 (06:40 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sat, 21 Jan 2017 06:40:23 +0000 (06:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1779700 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_brotli.c

index bea3ec7dd8db3cee38fe43c69ec237d23b73e79f..1302a25b6d846c5bacffdf9a68fece441265e6f3 100644 (file)
@@ -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);
                 }
             }
         }