HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2712

File a bug

SVNBugCommentTime (UTC)
2712[Gecko] [Webkit] Allow Emacs-style mode lines on the first line of a cache manifest file. (credit: ap)2009-01-27 23:22
Index: source
===================================================================
--- source	(revision 2711)
+++ source	(revision 2712)
@@ -41847,11 +41847,11 @@
 
   <p>The first line of an application cache manifest must consist of
   the string "CACHE", a single U+0020 SPACE character, the string
-  "MANIFEST", and zero or more U+0020 SPACE and U+0009 CHARACTER
-  TABULATION (tab) characters.  The first line may optionally be
-  preceded by a U+FEFF BYTE ORDER MARK (BOM) character. If any other
-  text is found on the first line, the user agent will ignore the
-  entire file.</p>
+  "MANIFEST", and either a U+0020 SPACE character, a U+0009 CHARACTER
+  TABULATION (tab) character, a U+000A LINE FEED (LF) character, or a
+  U+000D CARRIAGE RETURN (CR) character. The first line may optionally
+  be preceded by a U+FEFF BYTE ORDER MARK (BOM) character. If any
+  other text is found on the first line, it is ignored.</p>
 
   <p>Subsequent lines, if any, must all be one of the following:</p>
 
@@ -42009,20 +42009,21 @@
    abort this algorithm with a failure while checking for the magic
    signature.</p></li>
 
-   <li><p><span>Collect a sequence of characters</span> that are
-   U+0020 SPACE or U+0009 CHARACTER TABULATION (tab)
-   characters.</p></li>
+   <li><p>If the character at <var title="">position</var> is neither
+   a U+0020 SPACE character, a U+0009 CHARACTER TABULATION (tab)
+   character, U+000A LINE FEED (LF) character, nor a U+000D CARRIAGE
+   RETURN (CR) character, then this isn't a cache manifest; abort this
+   algorithm with a failure while checking for the magic
+   signature.</p></li>
 
-   <li><p>If <var title="">position</var> is not past the end of <var
-   title="">input</var> and the character at <var
-   title="">position</var> is neither a U+000A LINE FEED (LF)
-   characters nor a U+000D CARRIAGE RETURN (CR) character, then this
-   isn't a cache manifest; abort this algorithm with a failure while
-   checking for the magic signature.</p></li>
-
    <li><p>This is a cache manifest. The algorithm cannot fail beyond
    this point (though bogus lines can get ignored).</p></li>
 
+   <li><p><span>Collect a sequence of characters</span> that are
+   <em>not</em> U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)
+   characters, and ignore those characters. (Extra text on the first
+   line, after the signature, is ignored.)</p></li>
+
    <li><p>Let <var title="">mode</var> be "explicit".</p></li>
 
    <li><p><em>Start of line</em>: If <var title="">position</var> is
@@ -42030,6 +42031,7 @@
    step. Otherwise, <span>collect a sequence of characters</span> that
    are U+000A LINE FEED (LF), U+000D CARRIAGE RETURN (CR), U+0020
    SPACE, or U+0009 CHARACTER TABULATION (tab) characters.</p></li>
+   <!-- strips leading spaces, ignores space-only lines, ignores blank lines -->
 
    <li><p>Now, <span>collect a sequence of characters</span> that are
    <em>not</em> U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)

|