Re: [core] block1 size negotiation with 4.13 Request Entity Too Large

Achim Kraus <achimkraus@gmx.net> Wed, 22 July 2020 13:20 UTC

Return-Path: <achimkraus@gmx.net>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9369A3A0919 for <core@ietfa.amsl.com>; Wed, 22 Jul 2020 06:20:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 tagged_above=-999 required=5 tests=[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, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
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 BL8qulLAKBEd for <core@ietfa.amsl.com>; Wed, 22 Jul 2020 06:20:16 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 3AE0C3A0915 for <core@ietf.org>; Wed, 22 Jul 2020 06:20:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595424005; bh=tJQmDMHQxNNjNiNVqWzWGDSXzikgHaKXsnJNs/WARrY=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=EokcevYmOknqbEs4MO1aCTwyIzaTRiLcbUR1ojUNSfMzhI7lJUdhy89TDtxpvbS7A 9QQoy9KK+VqteB2hdcpSNnb0gXiiFD1BUU/753DSfeb+J+WRCT2PtmF0NWfKw33uOl 4pwl0aXg4zvPnI12CnSiuyp9sUOB2mkst16mFLpg=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.45] ([94.216.229.78]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFKGZ-1k0eK411gH-00FjDA; Wed, 22 Jul 2020 15:20:05 +0200
To: Carsten Bormann <cabo@tzi.org>
Cc: "core@ietf.org" <core@ietf.org>, Simon Bernard <contact@simonbernard.eu>
References: <189d3f1e-9c83-b1c7-d8a1-7f195265bd2d@gmx.net> <e017c262-c88e-6d77-5f05-2ae2c1145aa8@gmx.net> <AA7B14A4-575F-465F-A106-3A6048877F79@tzi.org>
From: Achim Kraus <achimkraus@gmx.net>
Message-ID: <f114dcbf-ef6d-53d1-41e5-83db0835d408@gmx.net>
Date: Wed, 22 Jul 2020 15:20:03 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <AA7B14A4-575F-465F-A106-3A6048877F79@tzi.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: de-AT-frami
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:edpE4SRM5gwUeIrcBTQRJKF5ie1mR4Xn7ec8K8OboPlHbJd8ftq t+xIismyOFcUhOQ5ILuM5ebpVelpkBGwpoT8tXqMs5LeVZb2i1iO5H8Cr3Trv/yo7h/BmQj uv6YkNd0Rv33QRoh2SpaWb9KotDm0pFyztB+6Qyr5AmNGJUe7vP/cNL8OebiZFXg9Rs7ogl cdQbG/m4n3Ct/1qkJQ3Dg==
X-UI-Out-Filterresults: notjunk:1;V03:K0:9JUu8VcM2m8=:TpgQuhkXMs1QTL+rxpuKq2 Kg/LL/kUdRUEp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BDOV/h5IclJtm E1wv+rbmKOReix1pzDyhQ0Vb6hjdMOW0xVeY/NrMwcMeEb/cXE1LLjH1UpApwK6II3metk//a qxXrtLtD/FQHMKunWE9olhdmGVSRwfp88AGoQRJb6tuEukhzotcos1eC2vpeyQ6euhDFpBWCe sr3YT2kUyD1Q83QGMVlc0SG8h5DT3iTa/uvGQTg==
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/W0j4bdmCZ_4oaqmg5mDjACswTX4>
Subject: Re: [core] block1 size negotiation with 4.13 Request Entity Too Large
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Jul 2020 13:20:22 -0000

Hi Carsten,

thanks a lot!

 > So it is not forbidden to request a smaller block size later.

My point is,
- was this intented or
- just not considered and therefore not explicitly forbidden?

All examples and some text points more into the direction, that it is
intended to be negotiated only in the 1. exchange. I'm still not
convinced, I think to forbid this is the better approach.

Sure, if no-one else has doubts, go for it.

best regards
Achim Kraus

Am 22.07.20 um 13:08 schrieb Carsten Bormann:
> Hi Achim,
>
> Good questions.
>
>> On 2020-07-22, at 09:56, Achim Kraus <achimkraus@gmx.net> wrote:
>>
>> Dear list,
>>
>> I would really appreciate, if the detail questions about the 4.13
>> failover could be answered!
>>
>> Without answers, I'm still afraid, that implementations will became
>> "overcomplicated" and "less interoperable".
>>
>> 1. is it intended to change the block size only in the first exchange?
>> Or on other exchanges? (Additionally, if changing later is considered as
>> failure, how should that failure be handled/processed?)
>
> RFC 7959 says (Section 2):
>
>     In most cases, all blocks being transferred for a body (except for
>     the last one) will be of the same size.  (If the first request uses a
>     bigger block size than the receiver prefers, subsequent requests will
>     use the preferred block size.)  The block size is not fixed by the
>     protocol. […]
>
> Simon cited some more text, but this is about too many blocks, not about too big blocks.  So it is not forbidden to request a smaller block size later.  I would expect that this is a rather unusual case, so I would not be surprised if a client gives up if this happens in mid-transfer.  On the other hand, it is also not hard to enable a client to adapt.
>
>> 2. is it intended, that a 4.13 response without block1 option to a
>> request also without block1 option, should also use/try a failover with
>> a request with block 1 option?
>
> That’s what RFC 7959 says:
>
>     The error code 4.13 (Request Entity Too Large) can be returned at any
>     time by a server that does not currently have the resources to store
>     blocks for a block-wise request payload transfer that it would intend
>     to implement in an atomic fashion.  (Note that a 4.13 response to a
>     request that does not employ Block1 is a hint for the client to try
>     sending Block1, and a 4.13 response with a smaller SZX in its Block1
>     Option than requested is a hint to try a smaller SZX.)
>
> This is phrased as a note, because the response contains a hint; there is no requirement that Block1 is supported.
>
> Simon also asked:
>
>>    2) What exactly should send the server ? 4.13 or 4.13 + block1 with szx option ? is size1 should be used to guess the correct block size ?
>
> I would expect that the server should send the desired block size if it wants the client to change from the block size it used, so 4.13 + Block1.  Size1 is not about block size, but about the size of the whole body - if the server has a limitation there, it might want to error out on a 4.13 (without a Block1 option).
>
> Grüße, Carsten
>