Subject: issue 85 - range unit extensions

From: Mark Nottingham <[email-masked]>
Date: Mon, 28 Jul 2008 13:59:06 +0100

Issue 85 <http://tools.ietf.org/wg/httpbis/trac/ticket/85> asks us to  
clarify what content-range unit extensions (i.e., things other than  
"bytes") are, or get rid of them.

Julian has pointed out that there's at least one other one existent  
today (although not formally specified); see <http://msdn.microsoft.com/en-us/magazine/cc301869.aspx 
 >.

I think the right thing to do here is to document how they're to be  
extended (most likely in section 3 of p5).

Straw-man proposal (not exact text):

Range-unit extensions SHOULD NOT be specific to any format. This is  
because caches are allowed to combine ranges from multiple responses,  
and to serve range requests out of cache; format-specific range units  
make it less likely that implementations will be able to do this  
(although there may be exceptions, hence the SHOULD NOT). An  
informational reference to p6 to highlight this to potential extenders  
would be a good idea.

We'll also need to determine what the requirements for registration  
are (standards-track?), and set up the registry.

Furthermore, Section 6.2 - the BNF says:

> Content-Range = "Content-Range" ":" content-range-spec
>
> content-range-spec      = byte-content-range-spec
> byte-content-range-spec = bytes-unit SP
>                           byte-range-resp-spec "/"
>                           ( instance-length | "*" )
>
> byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
>                                | "*"
> instance-length           = 1*DIGIT

This does not allow other range units to be used. If we keep them,  
this BNF needs to be changed to something like:

Content-Range = "Content-Range" ":" content-range-spec

content-range-spec      = byte-content-range-spec / ext-content-range- 
spec
byte-content-range-spec = bytes-unit SP
                           byte-range-resp-spec "/"
                           ( instance-length | "*" )

byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
                                | "*"
instance-length           = 1*DIGIT
ext-content-range-spec = other-range-unit SP CHAR*

Note that section 6.2 places several requirements on the use of the  
Content-Range header which assume that byte-ranges are in use; we'd  
need to adjust the language appropriately.

Beyond that, I can't see what else we'd need to specify; everything  
else is unit-specific.

Thoughts?

--
Mark Nottingham     http://www.mnot.net/

---

From: "Frank Ellermann" <[email-masked]>
Date: Mon, 28 Jul 2008 16:11:36 +0200

Mark Nottingham wrote:
 
> see <http://msdn.microsoft.com/en-us/magazine/cc301869.aspx>.

Apparently a broken link, I found:
<http://msdn.microsoft.com/en-us/library/ms948096.aspx>

| Content-Length: 677
| Content-Range: rows=1-2; total=2

That is rather different from your proposal, I can't judge
the relevance of these apparently incompatible extensions.

 Frank

---

From: Mark Nottingham <[email-masked]>
Date: Mon, 28 Jul 2008 15:54:30 +0100

How is that incompatible?

---

From: "Frank Ellermann" <[email-masked]>
Date: Mon, 28 Jul 2008 20:06:00 +0200

> How is that incompatible?

Your syntax offers:

| ext-content-range-spec = other-range-unit SP CHAR*

The MSDN example is:

>From that I guess that "rows" in <other-range-unit>,
followed by "=" instead of SP.  But as I said, I've
not the faintest idea what I'm really talking about.

 Frank

---

From: Mark Nottingham <[email-masked]>
Date: Mon, 28 Jul 2008 23:14:41 +0100

Ah.

That was a straw-man, and definitely the weakest part of the proposal;  
we'd need to find the right BNF. It's a shame that they chose '=', I  
suppose we could do something like

other-range-unit ( SP / "=" ) CHAR*

Cheers,