Browse files

[gwr] (2) Make the online whitelist a prefix match feature, not an ex…

…act match feature.

git-svn-id: http://svn.whatwg.org/webapps@2337 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 8434cf8 commit 10f664f87a1a9df0b3c764512e9f76a209ae1817 @Hixie Hixie committed Oct 15, 2008
Showing with 38 additions and 23 deletions.
  1. +19 −10 index
  2. +19 −13 source
View
29 index
@@ -210,7 +210,7 @@
<li><a href=#features-defined-in-other-specifications><span class=secno>2.2.2 </span>Features defined in other specifications</a></li>
<li><a href=#common-conformance-requirements-for-apis-exposed-to-javascript><span class=secno>2.2.3 </span>Common conformance requirements for APIs exposed to
JavaScript</a></ol></li>
- <li><a href=#case-sensitivity><span class=secno>2.3 </span>Case-sensitivity</a></li>
+ <li><a href=#case-sensitivity-and-string-comparison><span class=secno>2.3 </span>Case-sensitivity and string comparison</a></li>
<li><a href=#common-microsyntaxes><span class=secno>2.4 </span>Common microsyntaxes</a>
<ol>
<li><a href=#common-parser-idioms><span class=secno>2.4.1 </span>Common parser idioms</a></li>
@@ -1892,7 +1892,7 @@
- <h3 id=case-sensitivity><span class=secno>2.3 </span>Case-sensitivity</h3>
+ <h3 id=case-sensitivity-and-string-comparison><span class=secno>2.3 </span>Case-sensitivity and string comparison</h3>
<p>This specification defines several comparison operators for
strings.</p>
@@ -1924,6 +1924,11 @@
with the corresponding characters in the range U+0061 .. U+007A
(i.e. LATIN SMALL LETTER A to LATIN SMALL LETTER Z).</p>
+ <p>A string <var title="">pattern</var> is a <dfn id=prefix-match>prefix match</dfn>
+ for a string <var title="">s</var> when <var title="">pattern</var>
+ is not longer than <var title="">s</var> and truncating <var title="">s</var> to <var title="">pattern</var>'s length leaves the
+ two strings as matches of each other.</p>
+
<h3 id=common-microsyntaxes><span class=secno>2.4 </span>Common microsyntaxes</h3>
@@ -34817,23 +34822,27 @@ style/default.css</pre>
mechanism or equivalent, then <a href=#fetch>fetch</a> the resource
normally and abort these steps.</li>
- <li><p>If the resource's URL, ignoring its fragment identifier if
- any, is listed in the <a href=#application-cache>application cache</a>'s <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>,
- then <a href=#fetch>fetch</a> the resource normally and abort these
- steps.</li>
-
<li><p>If the resource's URL is <a href=#concept-appcache-implicit title=concept-appcache-implicit>an implicit entry</a>, <a href=#concept-appcache-manifest title=concept-appcache-manifest>the manifest</a>, <a href=#concept-appcache-explicit title=concept-appcache-explicit>an explicit entry</a>, <a href=#concept-appcache-fallback title=concept-appcache-fallback>a fallback entry</a>, <a href=#concept-appcache-oppcache title=concept-appcache-oppcache>an opportunistically cached
entry</a>, or a <a href=#concept-appcache-dynamic title=concept-appcache-dynamic>dynamic
entry</a> in the <a href=#application-cache>application cache</a>, then get the
resource from the cache (instead of fetching it), and abort these
steps.</li>
+ <li><p>If there is an entry in the <a href=#application-cache>application cache</a>'s
+ <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
+ whitelist</a> that has the <a href=#same-origin>same origin</a> as the
+ resource's URL and that is a <a href=#prefix-match>prefix match</a> for the
+ resource's URL, then <a href=#fetch>fetch</a> the resource normally and
+ abort these steps.</li>
+
<li>
<p>If the resource's URL has the <a href=#same-origin>same origin</a> as the
- manifest's URL, and the start of the resource's URL's <a href=#url-path title=url-path>&lt;path&gt;</a> component is exactly matched
- by the &lt;path&gt; component of an <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespace</a> in the <a href=#application-cache>application cache</a>, then:
+ manifest's URL, and there is an <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
+ namespace</a> in the <a href=#application-cache>application cache</a> whose
+ &lt;path&gt; component is a <a href=#prefix-match>prefix match</a> for the
+ resource's URL's <a href=#url-path title=url-path>&lt;path&gt;</a>
+ component, then:
<p><a href=#fetch>Fetch</a> the resource normally. If this results 4xx
or 5xx status codes or equivalent, or if there were network errors
View
32 source
@@ -985,7 +985,7 @@
- <h3>Case-sensitivity</h3>
+ <h3>Case-sensitivity and string comparison</h3>
<p>This specification defines several comparison operators for
strings.</p>
@@ -1018,6 +1018,12 @@
with the corresponding characters in the range U+0061 .. U+007A
(i.e. LATIN SMALL LETTER A to LATIN SMALL LETTER Z).</p>
+ <p>A string <var title="">pattern</var> is a <dfn>prefix match</dfn>
+ for a string <var title="">s</var> when <var title="">pattern</var>
+ is not longer than <var title="">s</var> and truncating <var
+ title="">s</var> to <var title="">pattern</var>'s length leaves the
+ two strings as matches of each other.</p>
+
<h3>Common microsyntaxes</h3>
@@ -3487,8 +3493,6 @@
-
-
<h4>Interfaces for URL manipulation</h4>
<p>An interface that has a complement of <dfn>URL decomposition
@@ -39552,12 +39556,6 @@ style/default.css</pre>
mechanism or equivalent, then <span>fetch</span> the resource
normally and abort these steps.</p></li>
- <li><p>If the resource's URL, ignoring its fragment identifier if
- any, is listed in the <span>application cache</span>'s <span
- title="concept-appcache-onlinewhitelist">online whitelist</span>,
- then <span>fetch</span> the resource normally and abort these
- steps.</p></li>
-
<li><p>If the resource's URL is <span
title="concept-appcache-implicit">an implicit entry</span>, <span
title="concept-appcache-manifest">the manifest</span>, <span
@@ -39569,14 +39567,22 @@ style/default.css</pre>
resource from the cache (instead of fetching it), and abort these
steps.</p></li>
+ <li><p>If there is an entry in the <span>application cache</span>'s
+ <span title="concept-appcache-onlinewhitelist">online
+ whitelist</span> that has the <span>same origin</span> as the
+ resource's URL and that is a <span>prefix match</span> for the
+ resource's URL, then <span>fetch</span> the resource normally and
+ abort these steps.</p></li>
+
<li>
<p>If the resource's URL has the <span>same origin</span> as the
- manifest's URL, and the start of the resource's URL's <span
- title="url-path">&lt;path&gt;</span> component is exactly matched
- by the &lt;path&gt; component of an <span
+ manifest's URL, and there is an <span
title="concept-appcache-oppcache-ns">opportunistic caching
- namespace</span> in the <span>application cache</span>, then:
+ namespace</span> in the <span>application cache</span> whose
+ &lt;path&gt; component is a <span>prefix match</span> for the
+ resource's URL's <span title="url-path">&lt;path&gt;</span>
+ component, then:
<p><span>Fetch</span> the resource normally. If this results 4xx
or 5xx status codes or equivalent, or if there were network errors

0 comments on commit 10f664f

Please sign in to comment.