Re: Sections 3.3.2 and 3.3.3 allow bogus Content-Length?

Matthew Kerwin <matthew@kerwin.net.au> Wed, 15 February 2017 01:21 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 0F7D1129460 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 14 Feb 2017 17:21:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.4
X-Spam-Level:
X-Spam-Status: No, score=-6.4 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, 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 EESaikTL0ch1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 14 Feb 2017 17:21:16 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 60E1A129404 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 14 Feb 2017 17:21:16 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cdoFc-0001mx-Mr for ietf-http-wg-dist@listhub.w3.org; Wed, 15 Feb 2017 01:19:20 +0000
Resent-Date: Wed, 15 Feb 2017 01:19:20 +0000
Resent-Message-Id: <E1cdoFc-0001mx-Mr@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <phluid61@gmail.com>) id 1cdoFY-0001m0-D0 for ietf-http-wg@listhub.w3.org; Wed, 15 Feb 2017 01:19:16 +0000
Received: from mail-it0-f42.google.com ([209.85.214.42]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <phluid61@gmail.com>) id 1cdoFR-0004Bl-QA for ietf-http-wg@w3.org; Wed, 15 Feb 2017 01:19:11 +0000
Received: by mail-it0-f42.google.com with SMTP id 203so57042199ith.0 for <ietf-http-wg@w3.org>; Tue, 14 Feb 2017 17:18:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kJTHeXWqnskxNFrMPzfS53jr0JpywSg78KcpTOzzLy4=; b=SxWSasSe1CMH/OltS5AbvxE126mUqyPcf0WH56XiRwGxuYYW1e5woWbro7faknf13A kJfcUz04ltJV1erqMZDY9Zk1ZrKmlUp2FI2MT/PfCy+WNpmUuKxgU711G7QQ9b5XzPtw nsItiYbfkWfyLnGWFkwBnTsKoMKdsk6gGJZK5K4aNtQBn2dgfXfxqbjVZRkPLigVRbPN /DQkteHoNMXDR5W/7R/kJaC1pFGrCm9AXJpOyotG7WcLdD4SGN43Fnd6Lc6oMEkX6ihL 10e+TaJ5chfiKylO8/ywtlZ79ldgF6JKtL5HgAX2928REVTwbGsVTUOgWOonGI41wC3V S8xQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=kJTHeXWqnskxNFrMPzfS53jr0JpywSg78KcpTOzzLy4=; b=Dzb/P/ZLZ6tqDDfGE8BNgfUdrIRK2g1xTszNDkQCQ1FAjhlIxrcDujhXDjtXspsHFh 5t2vc/sgTsgUu2BTJfzFuEgv5Dj6hpwAqDBzRhTOoHNJQ539vDDVymeeY2ScNTCdEzxU tuTTS02Qv+L6MpToWOEtc5TXvZBQSLjjd80XF1zPmsyQvUR1s9m57hRDvAquCii7Ytcu U+u6d7+vDYbR9I3cG6+B6hmokSx9GAA2wRs1gPLRzm8TOYE+Fpfyb8HEcA94ITSudS8r BXU4uHr/bQmdUk3hNmNPpeNDv9hKJufoSXfOH6HYIq7RPESUDapHwAQxCAjggbtaHiWT KKSA==
X-Gm-Message-State: AMke39nucPI3+PqHGNfxjAFAxoZe7AqDnxC1tjiR759hMhSixyiNXKCQOlcyeI8WLQWimpJ+mhh2ux1B7vpZ6w==
X-Received: by 10.36.92.70 with SMTP id q67mr6566022itb.55.1487121523901; Tue, 14 Feb 2017 17:18:43 -0800 (PST)
MIME-Version: 1.0
Sender: phluid61@gmail.com
Received: by 10.107.154.145 with HTTP; Tue, 14 Feb 2017 17:18:43 -0800 (PST)
In-Reply-To: <emdcdebbb8-1ff5-4139-b8f2-409fe94eb6e8@bodybag>
References: <emdcb96fc0-0d2f-436c-9f1f-05beffe7593e@bodybag> <e01c4945-1116-d258-7004-ea917843bf3d@ninenines.eu> <ema747b801-6dcc-4b2d-ac95-9a027e10c0b4@bodybag> <7874c62b-c6a0-5d84-8115-20016b45118a@measurement-factory.com> <em541e3407-4e99-468e-a1e7-85a7bf074bdd@bodybag> <874938e6-2153-e02a-ab0e-814f468c58f8@measurement-factory.com> <em95b13204-3a33-4bd5-81d2-791e809b9cd2@bodybag> <0f12628c-ab62-22c2-2cf3-e4b456072597@measurement-factory.com> <emdcdebbb8-1ff5-4139-b8f2-409fe94eb6e8@bodybag>
From: Matthew Kerwin <matthew@kerwin.net.au>
Date: Wed, 15 Feb 2017 11:18:43 +1000
X-Google-Sender-Auth: y5epXjdmIS3J0pdhdxo8Zt5jtj4
Message-ID: <CACweHNBTqcjw=Qdu1mWTeosUMYt0B86xnH8VJoQBYvVMFmCQaw@mail.gmail.com>
To: Adrien de Croy <adrien@qbik.com>
Cc: Alex Rousskov <rousskov@measurement-factory.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a114452ce2b8fdf05488776e1"
Received-SPF: pass client-ip=209.85.214.42; envelope-from=phluid61@gmail.com; helo=mail-it0-f42.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.446, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.2, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1cdoFR-0004Bl-QA 6754ad2b9faf6f6dd299bba7901f363c
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Sections 3.3.2 and 3.3.3 allow bogus Content-Length?
Archived-At: <http://www.w3.org/mid/CACweHNBTqcjw=Qdu1mWTeosUMYt0B86xnH8VJoQBYvVMFmCQaw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33516
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: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 15 February 2017 at 10:42, Adrien de Croy <adrien@qbik.com> wrote:

>
>
> ------ Original Message ------
> From: "Alex Rousskov" <rousskov@measurement-factory.com>
> To: "Adrien de Croy" <adrien@qbik.com>; "ietf-http-wg@w3.org" <
> ietf-http-wg@w3.org>
> Sent: 15/02/2017 1:32:04 PM
> Subject: Re: Sections 3.3.2 and 3.3.3 allow bogus Content-Length?
>
> On 02/14/2017 04:18 PM, Adrien de Croy wrote:
>>
>>  The only true size of a body is what you obtain by counting its bytes.
>>>
>>
>> I disagree. The only true size of a body is the Content-Length value (in
>> relevant contexts).
>>
>
> What about for a sender piecing a message together.  Where does
> Content-Length come from?
>
> The content existed before you derived or obtained its length.
>
>
When we say "content" do we mean content of the message, content of the
representation, or content of the resource? I've always taken
content-length to mean the content of the representation[*] -- which, since
the demise of T-E, basically means message payload.

When we say "body", I hope we're all always talking about message payload.
(i.e.: representation · Range · T-E)

Reasoning about the _*resource*_ (including file size) is the purview of
the application, outside of HTTP transport or semantics. At least, that's
how it looks from my ivory tower.

[*] something something Range something

Cheers
-- 
  Matthew Kerwin
  http://matthew.kerwin.net.au/