Bug 1243849 - Restore support for accessing the Cache API from app:// URLs and also for storing requests/responses with app:// URLs within it; r=bkelly

Firefox OS still needs to use the cache API both to access it, and possibly
store app:// URL resources inside it.  See for example code in
https://github.com/fxos-components/fxos-fastlist/blob/master/fxos-fastlist.js
that manipulates the cache.  Let's restore this support for now since it's
pretty harmless.
This commit is contained in:
Ehsan Akhgari 2016-01-28 14:40:07 -05:00
Родитель a4168970bf
Коммит 226d0657b3
2 изменённых файлов: 3 добавлений и 1 удалений

1
dom/cache/CacheStorage.cpp поставляемый
Просмотреть файл

@ -119,6 +119,7 @@ IsTrusted(const PrincipalInfo& aPrincipalInfo, bool aTestingPrefEnabled)
nsAutoCString scheme(Substring(flatURL, schemePos, schemeLen));
if (scheme.LowerCaseEqualsLiteral("https") ||
scheme.LowerCaseEqualsLiteral("app") ||
scheme.LowerCaseEqualsLiteral("file")) {
return true;
}

3
dom/cache/TypeUtils.cpp поставляемый
Просмотреть файл

@ -417,7 +417,8 @@ TypeUtils::ProcessURL(nsACString& aUrl, bool* aSchemeValidOut,
if (aSchemeValidOut) {
nsAutoCString scheme(Substring(flatURL, schemePos, schemeLen));
*aSchemeValidOut = scheme.LowerCaseEqualsLiteral("http") ||
scheme.LowerCaseEqualsLiteral("https");
scheme.LowerCaseEqualsLiteral("https") ||
scheme.LowerCaseEqualsLiteral("app");
}
uint32_t queryPos;