Re: Digest, trailers and buffering was: Re: Updating Digest header RFC3230 using "selected representation"

Rob Sayre <sayrer@gmail.com> Wed, 24 July 2019 20:14 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A332F12051B for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Jul 2019 13:14:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.75
X-Spam-Level:
X-Spam-Status: No, score=-2.75 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cIgVkTog5fpA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Jul 2019 13:14:47 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E7B9E12025D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 24 Jul 2019 13:14:46 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hqNcW-0003eT-G0 for ietf-http-wg-dist@listhub.w3.org; Wed, 24 Jul 2019 20:12:16 +0000
Resent-Date: Wed, 24 Jul 2019 20:12:16 +0000
Resent-Message-Id: <E1hqNcW-0003eT-G0@frink.w3.org>
Received: from mimas.w3.org ([2603:400a:ffff:804:801e:34:0:4f]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <sayrer@gmail.com>) id 1hqNcU-0003dh-5S for ietf-http-wg@listhub.w3.org; Wed, 24 Jul 2019 20:12:14 +0000
Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from <sayrer@gmail.com>) id 1hqNcS-0004e6-NJ for ietf-http-wg@w3.org; Wed, 24 Jul 2019 20:12:13 +0000
Received: by mail-io1-xd2c.google.com with SMTP id m24so92350129ioo.2 for <ietf-http-wg@w3.org>; Wed, 24 Jul 2019 13:11:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WWEHU0a4tExq7j6DcT44/cQd0snf+cjQUZxwH+8XtY8=; b=Z97jzozblxDMvsgQKPJijW8Q2cPgKK4r8E1xBu9yGel1RC8UnB+kiB8TmrUUoq9s2Q HVmH3rOYE92KZCURyVDmn2I905Z0lKdJMAZAoZANvgR7wTya86EgK38wk2S9jHyjmK26 zJnyTCjZTZ9/S7gTzzqtzHVkk7vLOs2J8J8hGVh7c3U+9ojjhzPq9zyMzArQU/XjeoiR pGKuMXFgaQa4+L5h3NJekJcATQkyzqlhOQqAPxBdkAi9+rR1v2W3QdS2xrA2yEK4/QaO i3ke71zKb2bvHkT0sxD8gMzDzqiYtQ37tA2HN2+o2UOvPXr4quZmgQ69q8c4cGo2yrWQ VxPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WWEHU0a4tExq7j6DcT44/cQd0snf+cjQUZxwH+8XtY8=; b=o34ckXdpDB4xEWhTGcY1S3uhYgt/Y4ZKY5Nfwwd66XaaMI5Zt2z3d/he+0RGhq/t4P hST43pfuUDUO8OWFO8re9PQ8/CEqMlK/IeRFTBZLRQe6wAEDNPrkfA8KcUy/9qcOrZZG 99/WSrznbSg1+zAPAUaPX3aqbpkR4yLz+ocENfS15LPkVpX6RU76fxVwNgonubnvZK1L twSvsFojBs/WxUJYl5bD6Zwte7vUhqD1H8+3DbV51q3i6ZheHlu76F142UbqkBBMWLlX 0eHXW5FstfM5qNgXAh3drbDOHU/aw9a55/0OJN/9TV5YAz8RnVTwLzdsoAdWHcom/x6i QsUg==
X-Gm-Message-State: APjAAAUZo2El1BNGpWeu4h09c76IE3Uu16yk8WDyB3GUB0nfTA/aytNp HH4N99h53uAqukONem3tlUVyVQId+kcR42RjP+jemMIXJQLxZw==
X-Google-Smtp-Source: APXvYqy3o9OyNTc8N/xpYekeA+2tMz3AZuY5YEYU0NM2ZJsZk6ZMxg5wjf+URM1O9sUOa2g+e2x1UkDIsInd4/+U73M=
X-Received: by 2002:a02:1087:: with SMTP id 129mr90701950jay.131.1563999111684; Wed, 24 Jul 2019 13:11:51 -0700 (PDT)
MIME-Version: 1.0
References: <CAMRHeuyk-xv2oRmcVrFaesneVi4F-EcuttsJU5PKtGrVtP+gSA@mail.gmail.com> <CALGR9obe6mPMCW2O1gf0muWgoT4Nusy8CsoixgENWKTSEf4rGA@mail.gmail.com> <CAMRHeux6=i0Xkg5XPXp8PCZiiLopGkYGTPWztghfzgUx+XF5=Q@mail.gmail.com> <CALGR9oYbZpKMThSJqSAheRfE8NVnDkhMYSbRP-gYnc5-5k8LmQ@mail.gmail.com> <CAChr6SyxGEfV1rHjX8oMLvB-osdgsbjWjkeWAWbPfGAFdC4Zwg@mail.gmail.com> <CAChr6SynBvPB+6yBnKk9z9FFZs0ZynremyntGGyT2Q3S0tmY1g@mail.gmail.com> <CALGR9oavnNtKXhAAs8aR02TTrWzPVyuW0oQcxe+qqHei7n-pCQ@mail.gmail.com> <CAChr6SzUzJpVH=Jz43DkbZq9gyf1RtYdQPReyweo5kA76yECDQ@mail.gmail.com> <CALGR9obz3e_os3MXyW9hBU8PLPjhuAUYy5UeYq3_5tW46nqEeA@mail.gmail.com> <CAChr6Swq-DTseOMc=n61vPYz4XmmRD3Yx7NKWAX5p6QqCwUJdA@mail.gmail.com> <CAMRHeuxPnBrVHK=bHG+dh5UcEZn+_5A5TAgSwTnFrWmUyDGwEA@mail.gmail.com>
In-Reply-To: <CAMRHeuxPnBrVHK=bHG+dh5UcEZn+_5A5TAgSwTnFrWmUyDGwEA@mail.gmail.com>
From: Rob Sayre <sayrer@gmail.com>
Date: Wed, 24 Jul 2019 13:11:39 -0700
Message-ID: <CAChr6SyGmRvSM__ZoezuVdmp=Z8=uu6tt+jedVYtVk1D4DMM6w@mail.gmail.com>
To: Roberto Polli <roberto@teamdigitale.governo.it>
Cc: Lucas Pardue <lucaspardue.24.7@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="0000000000007b2937058e72ebf2"
Received-SPF: pass client-ip=2607:f8b0:4864:20::d2c; envelope-from=sayrer@gmail.com; helo=mail-io1-xd2c.google.com
X-W3C-Hub-Spam-Status: No, score=-2.5
X-W3C-Hub-Spam-Report: AWL=1.570, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1hqNcS-0004e6-NJ 0165c7d0ac7789d6d4e5ca3c20634230
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Digest, trailers and buffering was: Re: Updating Digest header RFC3230 using "selected representation"
Archived-At: <https://www.w3.org/mid/CAChr6SyGmRvSM__ZoezuVdmp=Z8=uu6tt+jedVYtVk1D4DMM6w@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36833
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Wed, Jul 24, 2019 at 2:06 AM Roberto Polli <
roberto@teamdigitale.governo.it> wrote:

> 1- about HTTP/1.1 trailers.
> > One issue that prevented the adoption of this header and related ones
> (e.g. Content-MD5) was that
> > HTTP/1.1 trailers had a lot of interoperability problems
> > Sending the digest as a trailer reduces costs for the sender, whether
> it's an upload or download. .
>
> If you mean https://tools.ietf.org/html/rfc7230#section-4.4, they
> apply to transfer coded messages, so iiuc
> the only reasonable way to send Digest in a trailer was if the message
> was transfer-coded from the
> beginning by the Origin-Server. Do you agree?
>

Yes, I think I agree. Additionally, I wanted to point out that this did not
work very well in practice.

It seems like a trailer might work quite a bit better over HTTP/2 and later.

> 2- about huge payload

I think the key point is that you can feed bytes to a hash function
incrementally--in fact, this is the exact use case given in RFC 7230,
section 4.4. I don't think it's a security concern, but I think it would
help to point out that the sender (server or client), should probably
provide this data in a trailer (or equivalent).

thanks,
Rob