- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 27 Jan 2009 23:25:40 +0000 (UTC)
On Tue, 30 Dec 2008, Alexey Proskuryakov wrote: > > 1. The signature of manifest is "^<BOM>?CACHE MANIFEST[ \t]*$". Since > arbitrary whitespace is allowed at the end, it is not possible to verify > it with a simple binary comparison, yet it unnecessarily forbids e.g. > comments at the end. > > I suggest changing the signature to "^<BOM>?CACHE MANIFEST" - then it > will be easier to verify, and it will be possible to add comments at the > end. This is how we have it in WebKit now, and changing the check to the > more strict HTML5 one may affect existing clients. On Tue, 30 Dec 2008, timeless wrote: > > this means we could never do: "^<BOM>?CACHE MANIFEST2" On Tue, 30 Dec 2008, Alexey Proskuryakov wrote: > > If incompatible changes to the format are ever needed, we can change > Content-Type. On Wed, 31 Dec 2008, Jonas Sicking wrote: > > Ugh, depending on the content-type for things like versioning would > suck, people have a hard time getting that right even for HTML vs. GIF, > so trying to use it for things as subtle as versions is bound to be too > unreliable. > > But maybe just using a signature to detect that it's a manifest file of > some version is enough, then manifest specific code can be used to > choose which parser version to use. On Wed, 31 Dec 2008, Alexey Proskuryakov wrote: > > My point is that the manifest format is quite extensible as it is, so > only a very drastic change would require versioning. > > But anyway, it will still be possible to change signatures: just use > "^<BOM>?EXTENDED CACHE MANIFEST", not "^<BOM>?CACHE MANIFEST2". I've changed the spec to only look for "<BOM>?CACHE MANIFEST" followed by either a space, a tab, an LF, or a CR. The format is intended to be extensible so that we don't have to ever introduce versioning, but as Alexey points out, if necessary we can always use another magic line. By requiring a space if there is any data on the line, we can even use something like "CACHE MANIFEST; V2" or something like that. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 27 January 2009 15:25:40 UTC