Subject: [core] draft-ietf-core-block-08 - CoAP Block vs HTTP Range

From: Klaus Hartke <[email-masked]>
Date: Wed, 11 Apr 2012 06:33:26 +0200

Just an interesting little detail I noticed:

The Block1 and Block2 options change between descriptive usage and
control usage depending on whether they appear in a request or a
response:

* Block1 in a request - descriptive usage (describes the payload of the request)
* Block2 in a request - control usage (controls the payload of the response)
* Block1 in a response - control usage (controls the payload of the request)
* Block2 in a response - descriptive usage (describes the payload of
the response)

HTTP has something similar to Block2 with the Range/Content-Range
header fields:

* Range in a request - control usage (controls the payload of the response)
* Content-Range in a response - descriptive usage (describes the
payload of the response)

So a more intuitive alternative to Block1 and Block2 could be a Block
and a Content-Block option:

* Block in a request - control usage (controls the payload of the response)
* Block in a response - control usage (controls the payload of the request)
* Content-Block in a request - descriptive usage (describes the
payload of the request)
* Content-Block in a response - descriptive usage (describes the
payload of the response)

Klaus

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 11 Apr 2012 10:36:18 +0200

> * Content-Range in a response - descriptive usage (describes the

Do we have to discuss this in the -block document or should this go into the HTTP mapping best practices?
(Or is this just an observation that can stay in the mailing list?)

> * Content-Block in a response - descriptive usage (describes the

I think this variation may be more intuitive if you are building a mapper.
The current setup has the advantage that it clearly separates between the usage for request and response payloads, which are the more likely granularity of implementing/not implementing something.

Grüße, Carsten