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

I noticed I missed a slash at the example:  "/folder_c 6.jpg 7.jpg" should
have been "/folder_c/ 6.jpg 7.jpg"

Dvir


On Thu, Jun 27, 2013 at 12:46 PM, D R <de3940@gmail.com> wrote:

> 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:54:14 UTC