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

Rob Sayre <> Wed, 24 July 2019 20:14 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id A332F12051B for <>; Wed, 24 Jul 2019 13:14:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.75
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id cIgVkTog5fpA for <>; Wed, 24 Jul 2019 13:14:47 -0700 (PDT)
Received: from ( [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 (Postfix) with ESMTPS id E7B9E12025D for <>; Wed, 24 Jul 2019 13:14:46 -0700 (PDT)
Received: from lists by with local (Exim 4.89) (envelope-from <>) id 1hqNcW-0003eT-G0 for; Wed, 24 Jul 2019 20:12:16 +0000
Resent-Date: Wed, 24 Jul 2019 20:12:16 +0000
Resent-Message-Id: <>
Received: from ([2603:400a:ffff:804:801e:34:0:4f]) by with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <>) id 1hqNcU-0003dh-5S for; Wed, 24 Jul 2019 20:12:14 +0000
Received: from ([2607:f8b0:4864:20::d2c]) by with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from <>) id 1hqNcS-0004e6-NJ for; Wed, 24 Jul 2019 20:12:13 +0000
Received: by with SMTP id m24so92350129ioo.2 for <>; Wed, 24 Jul 2019 13:11:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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: <> <> <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
From: Rob Sayre <>
Date: Wed, 24 Jul 2019 13:11:39 -0700
Message-ID: <>
To: Roberto Polli <>
Cc: Lucas Pardue <>, HTTP Working Group <>
Content-Type: multipart/alternative; boundary="0000000000007b2937058e72ebf2"
Received-SPF: pass client-ip=2607:f8b0:4864:20::d2c;;
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: 1hqNcS-0004e6-NJ 0165c7d0ac7789d6d4e5ca3c20634230
Subject: Re: Digest, trailers and buffering was: Re: Updating Digest header RFC3230 using "selected representation"
Archived-At: <>
X-Mailing-List: <> archive/latest/36833
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

On Wed, Jul 24, 2019 at 2:06 AM Roberto Polli <> 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, 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).