Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 73D87200C03 for ; Sat, 21 Jan 2017 09:57:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 63276160B4A; Sat, 21 Jan 2017 08:57:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AB670160B3C for ; Sat, 21 Jan 2017 09:57:22 +0100 (CET) Received: (qmail 84144 invoked by uid 500); 21 Jan 2017 08:57:21 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 84134 invoked by uid 99); 21 Jan 2017 08:57:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jan 2017 08:57:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 11044C0663 for ; Sat, 21 Jan 2017 08:57:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.321 X-Spam-Level: X-Spam-Status: No, score=-0.321 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id BG4nOgdtAMYE for ; Sat, 21 Jan 2017 08:57:20 +0000 (UTC) Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A39205F286 for ; Sat, 21 Jan 2017 08:57:19 +0000 (UTC) Received: by mail-qk0-f174.google.com with SMTP id 11so34133751qkl.3 for ; Sat, 21 Jan 2017 00:57:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=OB2yKqoQJby5OHBAuuNiYxErHytDuu47cbiE7ZAEdcg=; b=AO4IKkl4D+fORHMpLuQE6dIV/pIjxPTDM32aLz1+SvoT7ayspjrAdBl0sqfGQYDlZy O5+19jM9XT6Beun9x9gSIAHVjzES9KN26p9sJK6V2pxKAZA3eTUGxBxZJNYYp114rX4k Fxo5lsWBcItEi0HkUwM8DTIA3Zojcp9VHbqOB+fn0c0m03KiVGfZMG5K7sc2gqrCnlWt 5xzcaEdrq8a2jVtOMvURtxpHYuArDhKpvmmWG0A9Jal+2sVOViC7zuLUFkEQ6+69LTZb LPwUwfoThhJLxeZ5AFX+pac/OFpGxPTL6tlGBo6SRMSvoZuYVfkKpgkMmH9eDk1WRkiO TQmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=OB2yKqoQJby5OHBAuuNiYxErHytDuu47cbiE7ZAEdcg=; b=eCvxA6co+3JX1DFbULgnN58Nw1InXZ3fTPYPAbAElVl38r2SoWXYpAOrZAL4oi5EPP lDrj2F0VBChBQcxFouLddKI5snJuPnlgFlilh8t1qD55+jkzFVANF8Ao179xc0HFHKTs p64PKAri5sqSYaON37Qy6a0mWFAoqW/PoVflObhunaouooqeGT81XHjxskbdilr+m8SC C/loPyESK6O5b7PKc70O7XNvfEt2B7vPFtQny3t+Tts5fpdswg/b+QxUpndqtq0Jf5/c mN1lsMQVI3sqCXGceExBMgr1rpp2zIegwuZISMlmj8hkPEKgv4nD1E4mgyhasmKm/7sb KxtA== X-Gm-Message-State: AIkVDXKktir1Aapju6+TYIv+hdMXt8OSatjHD2YYIaLwDaXQxCfj6sjcj0toPbquoxbtuarzniTZJvpOV68EaA== X-Received: by 10.55.12.67 with SMTP id 64mr15422431qkm.171.1484989032701; Sat, 21 Jan 2017 00:57:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.177.66 with HTTP; Sat, 21 Jan 2017 00:57:12 -0800 (PST) In-Reply-To: <20170121064024.412573A0158@svn01-us-west.apache.org> References: <20170121064024.412573A0158@svn01-us-west.apache.org> From: Yann Ylavic Date: Sat, 21 Jan 2017 09:57:12 +0100 Message-ID: Subject: Re: svn commit: r1779700 - /httpd/httpd/trunk/modules/filters/mod_brotli.c To: httpd-dev Content-Type: text/plain; charset=UTF-8 archived-at: Sat, 21 Jan 2017 08:57:23 -0000 Hi, On Sat, Jan 21, 2017 at 7:40 AM, wrote: > Author: jailletc36 > Date: Sat Jan 21 06:40:23 2017 > New Revision: 1779700 > > URL: http://svn.apache.org/viewvc?rev=1779700&view=rev > Log: > Save a few bytes and a few cycles. > > Modified: > httpd/httpd/trunk/modules/filters/mod_brotli.c > > Modified: httpd/httpd/trunk/modules/filters/mod_brotli.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_brotli.c?rev=1779700&r1=1779699&r2=1779700&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/filters/mod_brotli.c (original) > +++ httpd/httpd/trunk/modules/filters/mod_brotli.c Sat Jan 21 06:40:23 2017 > @@ -443,9 +443,9 @@ static apr_status_t compress_filter(ap_f > 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); We could possibly save more bytes yet with something like: etag = apr_psnprintf(r->pool, etag, "%.*s-br\"", (int)(len - 1), etag); Regards, Yann.