W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2013

draft-snell-httpbis-mget: Proposal for a new SHORTER format to header field :path

From: D R <de3940@gmail.com>
Date: Thu, 27 Jun 2013 12:46:48 +0300
Message-ID: <CAA4aZewMQNwepWttXXweuT=-P5ZwpV2+0CA=0bwEMmacQeaMZg@mail.gmail.com>
To: James Snell <jasnell@gmail.com>, ietf-http-wg@w3.org
Hi,
Lets say, we want these resources:
/folder_a/1.jpg
/folder_a/2.jpg
/folder_a/sub_folder_a/3.jpg
/folder_a/sub_folder_a/4.jpg
/folder_a/sub_folder_a2/8.jpg
/folder_a/sub_folder_a2/9.jpg
/folder_b/5.jpg
/folder_c/6.jpg
/folder_c/7.jpg
so instead of writing this value at the ":path" header field:
"/folder_a/1.jpg /folder_a/2.jpg /folder_a/sub_folder_a/3.jpg
/folder_a/sub_folder_a/4.jpg /folder_a/sub_folder_a2/8.jpg
/folder_a/sub_folder_a2/9.jpg /folder_b/5.jpg /folder_c/6.jpg
/folder_c/7.jpg"

we can use this shorter format for the header field:
"/folder_a/ 1.jpg 2.jpg sub_folder_a/ 3.jpg 4.jpg ../sub_folder_a2/ 8.jpg
9.jpg /folder_b/5.jpg /folder_c 6.jpg 7.jpg"

The idea behind the new format is to represent a directed forest (graph
theory):
- when a token begins with "/", than it represents a new directed tree in
the forest.
- when a token ends with "/", than it is a cut vertex of the current tree,
and it is part of the path of the rest of the following vertexes of the
current tree.
- when a token doesn't end with a "/", than it is a leaf (a resource), and
all the previous cut vertexes of the current tree, build it path.
- when a token begins with this pattern "(?:../)+" with n repetitions, than
when we build the path of the rest of the vertexes of the current tree,
than we should go up in the directed tree n times.

I hope my explanation is clear,

Thanks,
Dvir
Received on Thursday, 27 June 2013 09:47:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:13 UTC