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

D R <de3940@gmail.com> Thu, 27 June 2013 09:48 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 46B2321F9CB9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 27 Jun 2013 02:48:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.998
X-Spam-Level:
X-Spam-Status: No, score=-7.998 tagged_above=-999 required=5 tests=[BAYES_50=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
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 b8fsWH9YJp+U for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 27 Jun 2013 02:48:52 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id E86C721F9CB8 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 27 Jun 2013 02:48:51 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Us8ne-0004C5-RK for ietf-http-wg-dist@listhub.w3.org; Thu, 27 Jun 2013 09:47:34 +0000
Resent-Date: Thu, 27 Jun 2013 09:47:34 +0000
Resent-Message-Id: <E1Us8ne-0004C5-RK@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <de3940@gmail.com>) id 1Us8nP-0004BL-SO for ietf-http-wg@listhub.w3.org; Thu, 27 Jun 2013 09:47:19 +0000
Received: from mail-la0-f68.google.com ([209.85.215.68]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <de3940@gmail.com>) id 1Us8nL-00081U-Ap for ietf-http-wg@w3.org; Thu, 27 Jun 2013 09:47:19 +0000
Received: by mail-la0-f68.google.com with SMTP id fq12so233086lab.11 for <ietf-http-wg@w3.org>; Thu, 27 Jun 2013 02:46:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ya3nFrr/f3JF0oEkQ4LubBYLPutpZtaO+sWwxbohM8Y=; b=q5+V1n4zIZmF9YjJtZCz3n3xRNHxXHbDmxHMGf4XxDTb67znBdKsErrSzOVXmKP/72 dRzA6UufmnyLeaSwk0ggOcBgiVJncfZIanwBFd5KIr3AKavyrAFl1mUfqz9J8RbDBS28 s4KnnPrJhHG/7XgaZXwKhkQkQgqV6VW3eB98kNppuZcT5IHPXRDK/OoOB6bvYrgY6d5o dOZDVbY29NQ+EL9XblC8jQZb8jEe+7g0NdkbhOlcwTRSPrxrkYYx4r5/jFZIbPf2Ad0z drfV5iovYm8NvgCSh+rzIUrt8gjyFOddk0da+0UeU1KWNv49bloYMgdUe0g4z7Lnj38+ qvBw==
MIME-Version: 1.0
X-Received: by 10.152.23.99 with SMTP id l3mr3726735laf.82.1372326408823; Thu, 27 Jun 2013 02:46:48 -0700 (PDT)
Received: by 10.112.81.4 with HTTP; Thu, 27 Jun 2013 02:46:48 -0700 (PDT)
Date: Thu, 27 Jun 2013 12:46:48 +0300
Message-ID: <CAA4aZewMQNwepWttXXweuT=-P5ZwpV2+0CA=0bwEMmacQeaMZg@mail.gmail.com>
From: D R <de3940@gmail.com>
To: James Snell <jasnell@gmail.com>, ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="089e0158ab6c1d284c04e01fa4f6"
Received-SPF: pass client-ip=209.85.215.68; envelope-from=de3940@gmail.com; helo=mail-la0-f68.google.com
X-W3C-Hub-Spam-Status: No, score=-0.5
X-W3C-Hub-Spam-Report: DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Us8nL-00081U-Ap 1673edf03f706564cd2b2eeac01d2215
X-Original-To: ietf-http-wg@w3.org
Subject: draft-snell-httpbis-mget: Proposal for a new SHORTER format to header field :path
Archived-At: <http://www.w3.org/mid/CAA4aZewMQNwepWttXXweuT=-P5ZwpV2+0CA=0bwEMmacQeaMZg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18393
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

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