Skip to content

Instantly share code, notes, and snippets.

@berg
Created February 2, 2011 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berg/807007 to your computer and use it in GitHub Desktop.
Save berg/807007 to your computer and use it in GitHub Desktop.
:(
diff --git a/WebCore/loader/appcache/ManifestParser.cpp b/WebCore/loader/appcach
index a2df825..b001bff 100644
--- a/WebCore/loader/appcache/ManifestParser.cpp
+++ b/WebCore/loader/appcache/ManifestParser.cpp
@@ -43,7 +43,8 @@ bool parseManifest(const KURL& manifestURL, const char* data,
ASSERT(manifest.explicitURLs.isEmpty());
ASSERT(manifest.onlineWhitelistedURLs.isEmpty());
ASSERT(manifest.fallbackURLs.isEmpty());
-
+ manifest.allowAllNetworkRequests = false;
+
Mode mode = Explicit;
RefPtr<TextResourceDecoder> decoder = TextResourceDecoder::create("text/cac
@@ -109,6 +110,12 @@ bool parseManifest(const KURL& manifestURL, const char* dat
while (p < lineEnd && *p != '\t' && *p != ' ')
p++;
+ if (mode == OnlineWhitelist && p - line.characters() == 1 && *line.
+ // Wildcard was found.
+ manifest.allowAllNetworkRequests = true;
+ continue;
+ }
+
KURL url(manifestURL, String(line.characters(), p - line.characters
if (!url.isValid())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment