Matthew Finkel pushed to branch android-components-60.0.5-10.0-1 at The Tor Project / Applications / android-components
Commits: 698c81b9 by Alex Catarineu at 2020-11-04T15:51:00+01:00 Bug 34439: Isolate Icon loader on Android
- - - - - 8dff8431 by Matthew Finkel at 2020-11-04T21:55:08+00:00 Merge remote-tracking branch 'acatgl/34439' into android-components-60.0.5-10.0-1
- - - - -
3 changed files:
- components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/fetch/GeckoViewFetchClient.kt - components/browser/icons/src/main/java/mozilla/components/browser/icons/loader/HttpIconLoader.kt - components/concept/fetch/src/main/java/mozilla/components/concept/fetch/Request.kt
Changes:
===================================== components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/fetch/GeckoViewFetchClient.kt ===================================== @@ -80,6 +80,7 @@ private fun Request.toWebRequest(): WebRequest = WebRequest.Builder(url) .addHeadersFrom(this) .addBodyFrom(this) .cacheMode(if (useCaches) CACHE_MODE_DEFAULT else CACHE_MODE_RELOAD) + .origin(origin) .build()
private fun WebRequest.Builder.addHeadersFrom(request: Request): WebRequest.Builder {
===================================== components/browser/icons/src/main/java/mozilla/components/browser/icons/loader/HttpIconLoader.kt ===================================== @@ -51,7 +51,8 @@ class HttpIconLoader( connectTimeout = Pair(CONNECT_TIMEOUT, TimeUnit.SECONDS), readTimeout = Pair(READ_TIMEOUT, TimeUnit.SECONDS), redirect = Request.Redirect.FOLLOW, - useCaches = true) + useCaches = true, + origin = request.url)
return try { val response = httpClient.fetch(downloadRequest)
===================================== components/concept/fetch/src/main/java/mozilla/components/concept/fetch/Request.kt ===================================== @@ -46,7 +46,8 @@ data class Request( val body: Body? = null, val redirect: Redirect = Redirect.FOLLOW, val cookiePolicy: CookiePolicy = CookiePolicy.INCLUDE, - val useCaches: Boolean = true + val useCaches: Boolean = true, + val origin: String? = null ) { /** * A [Body] to be send with the [Request].
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/...
tbb-commits@lists.torproject.org