W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] Zip archives as first-class citizens

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 28 Aug 2013 09:20:43 -0700
Message-ID: <CA+c2ei9yR7mqkHBSBXdcY9THP3zpSRfGUFwY-Oh8kBOP_y487Q@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: WHAT Working Group <whatwg@lists.whatwg.org>
On Wed, Aug 28, 2013 at 8:04 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 8/28/13 9:32 AM, Anne van Kesteren wrote:
>>
>> I'm not sure we need to consider sub-scheme if zip-path can work as
>> it's more complex and not very well thought out. E.g. imagine
>> view-source:zip:http://www.example.org/zip!test.html.
>
>
> What's the issue with that?  Gecko supports that (with jar:, not zip:),
> fwiw.

I have two concerns with the scheme-based approach.

* It dramatically complicates origin handling. This is something we've
seen multiple times in gecko and something that I expect authors will
struggle with too.

* It makes it impossible to have create a relative URL from inside the
zip file to refer to something on the same server but outside of the
zip file. Since anything outside of the zip file uses a different
scheme, it means that you have to use an absolute URL. Not even URLs
starting with "/" nor "//" can be used.

> 3)  We have implementation experience with the "sub-scheme" approach and we
> know it can work just fine (existence proof is jar: in Gecko).  The main
> difficulty it introduces is that computing the origin needs to be done via
> object accessors, not string-parsing...  Do we have any implementation
> experience with "zip-path"-like approaches?

I don't know about "can work just fine". Sure, if everyone does the
right thing, then it works. But we're having to strictly enforce that
no one does string parsing by hand and instead use URL objects and
Principal objects. Neither of which really are an option on the web
right now as all URL-related APIs use strings.

> I don't think relative URIs should ever escape a zip archive (though I do
> appreciate the way that would let someone replace directories with zipped-up
> versions of those directories).  The reason for that is that allowing it
> sometimes but not others seems really weird to me, and it seems like we
> don't want to allow it for toplevel zip archives.

Why not?

/ Jonas
Received on Wednesday, 28 August 2013 16:21:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC