Re: [core] draft-ietf-core-block-08 - size request

Likepeng <likepeng@huawei.com> Thu, 29 March 2012 09:10 UTC

Return-Path: <likepeng@huawei.com>
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 8C27221F89FD for <core@ietfa.amsl.com>; Thu, 29 Mar 2012 02:10:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.605
X-Spam-Level: *
X-Spam-Status: No, score=1.605 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001, MIME_BASE64_TEXT=1.753, MIME_CHARSET_FARAWAY=2.45]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6D9+Iymz4eKN for <core@ietfa.amsl.com>; Thu, 29 Mar 2012 02:10:06 -0700 (PDT)
Received: from dfwrgout.huawei.com (dfwrgout.huawei.com [206.16.17.72]) by ietfa.amsl.com (Postfix) with ESMTP id 85D7A21F86D1 for <core@ietf.org>; Thu, 29 Mar 2012 02:10:06 -0700 (PDT)
Received: from 172.18.9.243 (EHLO dfweml202-edg.china.huawei.com) ([172.18.9.243]) by dfwrg01-dlp.huawei.com (MOS 4.2.3-GA FastPath) with ESMTP id AEU18212; Thu, 29 Mar 2012 05:10:06 -0400 (EDT)
Received: from DFWEML405-HUB.china.huawei.com (10.193.5.102) by dfweml202-edg.china.huawei.com (172.18.9.108) with Microsoft SMTP Server (TLS) id 14.1.323.3; Thu, 29 Mar 2012 02:08:24 -0700
Received: from SZXEML435-HUB.china.huawei.com (10.72.61.63) by dfweml405-hub.china.huawei.com (10.193.5.102) with Microsoft SMTP Server (TLS) id 14.1.323.3; Thu, 29 Mar 2012 02:08:21 -0700
Received: from SZXEML525-MBS.china.huawei.com ([169.254.8.158]) by szxeml435-hub.china.huawei.com ([::1]) with mapi id 14.01.0323.003; Thu, 29 Mar 2012 17:08:01 +0800
From: Likepeng <likepeng@huawei.com>
To: Jeroen Hoebeke <jeroen.hoebeke@intec.ugent.be>, core WG <core@ietf.org>
Thread-Topic: [core] draft-ietf-core-block-08 - size request
Thread-Index: AQHNDR9QU22ca5D8fkCgnI/JgSxxfJaA9dnV
Date: Thu, 29 Mar 2012 09:08:00 +0000
Message-ID: <34966E97BE8AD64EAE9D3D6E4DEE36F20331E0FF@szxeml525-mbs.china.huawei.com>
References: <5AE8C0D8-B82E-45D0-B015-A80C8DDBDBB5@intec.ugent.be>
In-Reply-To: <5AE8C0D8-B82E-45D0-B015-A80C8DDBDBB5@intec.ugent.be>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.24.1.46]
Content-Type: multipart/alternative; boundary="_000_34966E97BE8AD64EAE9D3D6E4DEE36F20331E0FFszxeml525mbschi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Subject: Re: [core] draft-ietf-core-block-08 - size request
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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, 29 Mar 2012 09:10:07 -0000

Hi,



>How does the server need to behave upon the reception of a size request?
>-(1) does it send back an empty response with a size option that gives the size estimate of the response? In this case, what is the response when the server does not support this option?
>or
>-(2) does it send back a response with a size option giving the size estimate of the response, but with a payload already containing the first block?



We can differentiate these two cases by giving the Size a zero value or not. Here is the text from Block draft:



   o  in a request, to ask the server to provide a size estimate in the
      response ("size request").  For this usage, the value MUST be set
      to 0.

So, if Size=0, that means case 1. If Size option is empty, that means case 2.



>It would be good to add the desired behavior to the description of the size request to avoid confusion.

Agree, we should add some texts to clarify the situation. I propose to take some texts (or change it a little bit) from the Size draft to Block draft.



Here is the text from draft-li-core-coap-size-option-02.txt:



   The GET request including Size=0 is treated as a request to get the
   size of the resource representation (but not the resource payload).

   The GET request including an empty Size option is treated as a
   request to get the size of the resource representation with the
   resource payload.

   The Size option SHOULD be included for resources larger than a single
   PDU, if the Size information is available.  And it MAY be included
   for resources smaller than a single MTU.



   The Size option SHOULD be used in a POST/PUT request in the first
   Block1 Option message.  If the recipient is not capable to receive the
   data with the indicated size, the recipient MUST return a 4.13
   (Request Entity Too Large) response code to the requester, and the
   data transmission is avoided, so that the cost of the actual data
   transmission is saved.

   For a GET request with Block2, if it includes an empty Size option, the Size
   option MUST be included in the response.  If the GET request includes
   a Block2 option, the Size option SHOULD be included in the first Block2
   response.  In other cases the GET response MAY contain a Size option.

Kind Regards

Kepeng



________________________________
发件人: core-bounces@ietf.org [core-bounces@ietf.org] 代表 Jeroen Hoebeke [jeroen.hoebeke@intec.ugent.be]
发送时间: 2012年3月29日 4:13
到: core WG
主题: [core] draft-ietf-core-block-08 - size request

Dear WG,

After giving the block draft a final reading, I discovered one minor issue that is not clear to me:

How does the server need to behave upon the reception of a size request?
- does it send back an empty response with a size option that gives the size estimate of the response? In this case, what is the response when the server does not support this option?
or
- does it send back a response with a size option giving the size estimate of the response, but with a payload already containing the first block?

It would be good to add the desired behavior to the description of the size request to avoid confusion.

Kind regards,
Jeroen