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

Simon Bernard <contact@simonbernard.eu> Thu, 02 July 2020 11:15 UTC

Return-Path: <contact@simonbernard.eu>
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 783763A0CD3 for <core@ietfa.amsl.com>; Thu, 2 Jul 2020 04:15:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 FXjiKCuCKgzw for <core@ietfa.amsl.com>; Thu, 2 Jul 2020 04:15:07 -0700 (PDT)
Received: from smtpout1.mo529.mail-out.ovh.net (smtpout1.mo529.mail-out.ovh.net [178.32.125.2]) (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 284953A0BEB for <core@ietf.org>; Thu, 2 Jul 2020 04:14:58 -0700 (PDT)
Received: from mxplan6.mail.ovh.net (unknown [10.109.156.13]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 84CB042AF8D6 for <core@ietf.org>; Thu, 2 Jul 2020 13:14:56 +0200 (CEST)
Received: from simonbernard.eu (37.59.142.101) by DAG3EX2.mxp6.local (172.16.2.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 2 Jul 2020 13:14:55 +0200
Authentication-Results: garm.ovh; auth=pass (GARM-101G004698d1c39-3346-4e6a-8d6e-76ae1f481da4, 113CA5DB217EE3FA4100C80DFA9199CC93DECF51) smtp.auth=contact@simonbernard.eu
From: Simon Bernard <contact@simonbernard.eu>
To: "core@ietf.org WG" <core@ietf.org>
Message-ID: <d1315f21-4749-f762-fbe1-a9ea6985805a@simonbernard.eu>
Date: Thu, 02 Jul 2020 13:14:54 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------DE0B32906E588DD3905FDB39"
Content-Language: en-US
X-Originating-IP: [37.59.142.101]
X-ClientProxiedBy: DAG2EX1.mxp6.local (172.16.2.11) To DAG3EX2.mxp6.local (172.16.2.22)
X-Ovh-Tracer-GUID: 03d4699f-1755-4a7d-bcc1-745b51c055a1
X-Ovh-Tracer-Id: 13956655248141924375
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrtdeggdefvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffuvffkffgfgggtihesrgdtreertdefjeenucfhrhhomhepufhimhhonhcuuegvrhhnrghrugcuoegtohhnthgrtghtsehsihhmohhnsggvrhhnrghrugdrvghuqeenucggtffrrghtthgvrhhnpefgudejhfevgfetjeehhfeigeduvefhkeevjeeihffhgeeiuddtteeuhffhudejfeenucffohhmrghinhepihgvthhfrdhorhhgnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrddutddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepmhigphhlrghniedrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegtohhnthgrtghtsehsihhmohhnsggvrhhnrghrugdrvghupdhrtghpthhtoheptghorhgvsehivghtfhdrohhrgh
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/BfOlcS_BpNXbksfjzz6iGpEa_SQ>
Subject: [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: Thu, 02 Jul 2020 11:15:14 -0000

Hi all,

   I have several questions about block1 size negotiation.
   The specification <https://tools.ietf.org/html/rfc7959#section-2.9.3> 
says :

    The present specification allows the server to return this response
    code (4.13) at any time during a Block1 transfer to indicate that it does
    not currently have the resources to store blocks for a transfer that
    it would intend to implement in an atomic fashion.  It also allows
    the server to return a 4.13 response to a request that does not
    employ Block1 as a hint for the client to try sending Block1.

    Finally, a 4.13 response to a request with a Block1 Option (control
    usage, seeSection 2.3  <https://tools.ietf.org/html/rfc7959#section-2.3>) where the response carries a smaller SZX in
    its Block1 Option is a hint to try that smaller SZX.

   So if a client send a block1 request and server can not handle a so 
big block it can answer with 4.13 + block1 with szx option. This means 
sends me smaller block (size is given in szx option).

   1) Could this kind of negotiation happen in a middle of a block1 
transfer ? or any block size negotiation (even negotiation which does 
not use 4.13) should always be done on first exchange ?

    Now Imagine a client which sends a normal (not block1) request with 
a too large payload and server want this payload be sent by block1.

   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 ?

    The more straightforward way seems to be "4.13 +block1 with szx 
option" this way this is clear that server support block1 and it gives 
the exact size of block it want. But the rfc sounds to consider this way 
only if original request is block1 too.

Thank you,

Simon