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 10E11200B5B for ; Fri, 5 Aug 2016 19:33:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0F566160A8E; Fri, 5 Aug 2016 17:33:39 +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 3036A160A64 for ; Fri, 5 Aug 2016 19:33:38 +0200 (CEST) Received: (qmail 79020 invoked by uid 500); 5 Aug 2016 17:33:37 -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 79010 invoked by uid 99); 5 Aug 2016 17:33:37 -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; Fri, 05 Aug 2016 17:33:37 +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 CC411C0981 for ; Fri, 5 Aug 2016 17:33:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.298 X-Spam-Level: * X-Spam-Status: No, score=1.298 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=rowe-clan-net.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Hso_nid120Ea for ; Fri, 5 Aug 2016 17:33:36 +0000 (UTC) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com [209.85.223.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B38BA5F36C for ; Fri, 5 Aug 2016 17:33:35 +0000 (UTC) Received: by mail-io0-f175.google.com with SMTP id q83so306706908iod.1 for ; Fri, 05 Aug 2016 10:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rowe-clan-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=J6lUDyM52Zc3AyH+eItWBE/o82qwcKm5AAgymwjTkWA=; b=kpvq+K49pbuLMSFF/umbiJPSI6NtYEBAe9M5YpVGqSFLOBilsofgcO/qbuuxepQ+oq YaZVgW6K70jE4mIT3XrJOxAL4MYeNvYs8tAzAIk8+4w9x7JWw8rHD/GoDvLVPk/3uyGs LKDWxYfZgGKxH+28eaN0j9+6fuPfnNiaA+PagjcK3bQrPZNfRT4ysKQ59lPhgdmC/lkB ebW2r76HuQHZ3MTFQQUVRLtgv9fbCePFb2Dh3RRRyF4kW9VJC/nAWF9q8BLpSw3ujEtt a3r7GYc+LPJTg/a9ap8ZS93nWEWLkn8P0klgvZwcM9sL1oDnq2fsBUMJ9JC0rht9awgQ 7baA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=J6lUDyM52Zc3AyH+eItWBE/o82qwcKm5AAgymwjTkWA=; b=iePszWA9k+YEb8YmJOWBbRFen3poDfkrtTfeS6fBIGbfqXE79RH2SqJHT3k2sAWvEZ j1nhhX5FEWB6gWfKKxGo2D74FNYw8pBJGlRz7XUL0PzNXuwuZjdDXPS/Pik4sLJSCL7n 1eJ3nmGWO1XNhhSTMKPwtxSxy166yaEri6ZfxV31Nc/0I8yhvU7V2ZmxNvHo5w19P21l GXsKlbPvmLVJdLckCSDqa+51gFdS3GMnSU0HG/bPpHa1vUow4g33avbwKuTt66O3XhHP V7DeTskLcP31OcKwH6laPdDsm8c3ScezMucR0rGQs7F5RQcIkej6hZbejlwe5dd14k6t sx0Q== X-Gm-Message-State: AEkoouvpC8lG7tGMQqXtaP42X66aj0Lpmv3qwieUlKXTE6naI3xNwHWiw1RrXk125vGpxf84Q9uSQeM1Mtd1fHvv X-Received: by 10.107.8.94 with SMTP id 91mr78477470ioi.86.1470418414010; Fri, 05 Aug 2016 10:33:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.6.85 with HTTP; Fri, 5 Aug 2016 10:33:33 -0700 (PDT) In-Reply-To: References: <20160803225811.8D40F3A00EC@svn01-us-west.apache.org> From: William A Rowe Jr Date: Fri, 5 Aug 2016 12:33:33 -0500 Message-ID: Subject: Re: svn commit: r1755124 - /httpd/httpd/trunk/server/protocol.c To: httpd Content-Type: multipart/alternative; boundary=001a113f3a883d1edb05395677c8 archived-at: Fri, 05 Aug 2016 17:33:39 -0000 --001a113f3a883d1edb05395677c8 Content-Type: text/plain; charset=UTF-8 On Fri, Aug 5, 2016 at 10:43 AM, Yann Ylavic wrote: > @@ -903,8 +903,16 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_ > */ > continue; > } > - else if (last_field != NULL) { > > + if (last_field == NULL) { > + /* Keep track of this first header line so that we can extend > it > + * across any obs-fold or parse it on the next loop iteration. > + */ > + last_field = field; > + last_len = len; > + continue; > + } > + > /* Process the previous last_field header line with all > obs-folded > * segments already concatinated (this is not operating on the > * most recently read input line). > This patch makes it less clear that the continue; case above also avoided the empty-line case (that was clearer in the main loop imo), while adding the unnecessary verification of last_len != 0 from line 904, so I'd say it's a net loss of legibility in spite of gaining us 4 characters. Just my 2c. --001a113f3a883d1edb05395677c8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On F= ri, Aug 5, 2016 at 10:43 AM, Yann Ylavic <ylavic.dev@gmail.com><= /span> wrote:
@@ -903,8 +903,16 @@ AP_DEC= LARE(void) ap_get_mime_headers_core(request_
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0continue;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 else if (last_field !=3D NULL) {

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (last_field =3D=3D NULL) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Keep track of this first head= er line so that we can extend it
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* across any obs-fold or p= arse it on the next loop iteration.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 last_field =3D field;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 last_len =3D len;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Process the previous las= t_field header line with all obs-folded
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * segments already concati= nated (this is not operating on the
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * most recently read input= line).
=C2=A0
This patch makes it less clea= r that the continue; case above also avoided
the empty-line case = (that was clearer in the main loop imo), while adding=C2=A0
the u= nnecessary verification of last_len !=3D 0 from line 904, so I'd say it= 's a=C2=A0
net loss of legibility in spite of gaining us 4 ch= aracters.=C2=A0 Just my 2c.


=
--001a113f3a883d1edb05395677c8--