Matthew Finkel pushed to branch android-components-60.0.5-10.0-1 at The Tor Project / Applications / android-components

Commits:

3 changed files:

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)
    80 80
         .addHeadersFrom(this)
    
    81 81
         .addBodyFrom(this)
    
    82 82
         .cacheMode(if (useCaches) CACHE_MODE_DEFAULT else CACHE_MODE_RELOAD)
    
    83
    +    .origin(origin)
    
    83 84
         .build()
    
    84 85
     
    
    85 86
     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(
    51 51
                 connectTimeout = Pair(CONNECT_TIMEOUT, TimeUnit.SECONDS),
    
    52 52
                 readTimeout = Pair(READ_TIMEOUT, TimeUnit.SECONDS),
    
    53 53
                 redirect = Request.Redirect.FOLLOW,
    
    54
    -            useCaches = true)
    
    54
    +            useCaches = true,
    
    55
    +            origin = request.url)
    
    55 56
     
    
    56 57
             return try {
    
    57 58
                 val response = httpClient.fetch(downloadRequest)
    

  • components/concept/fetch/src/main/java/mozilla/components/concept/fetch/Request.kt
    ... ... @@ -46,7 +46,8 @@ data class Request(
    46 46
         val body: Body? = null,
    
    47 47
         val redirect: Redirect = Redirect.FOLLOW,
    
    48 48
         val cookiePolicy: CookiePolicy = CookiePolicy.INCLUDE,
    
    49
    -    val useCaches: Boolean = true
    
    49
    +    val useCaches: Boolean = true,
    
    50
    +    val origin: String? = null
    
    50 51
     ) {
    
    51 52
         /**
    
    52 53
          * A [Body] to be send with the [Request].