Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for leaks (0.31 sec)

  1. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

       * be otherwise.
       *
       *
       * This test leaks a response body by not closing it.
       *
       * https://github.com/square/okhttp/issues/2409
       */
      @Test
      fun connectionsAreNotReusedIfNetworkInterceptorInterferes() {
        val responsesNotClosed: MutableList<Response?> = ArrayList()
        client =
          client.newBuilder()
            // Since this test knowingly leaks a connection, avoid using the default shared connection
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

          // able to record the edit, causing file leaks. In both cases, we want to retry the clean up
          // so we can get out of this state!
          cleanupQueue.schedule(cleanupTask)
          return null
        }
    
        // Flush the journal before creating files to prevent file leaks.
        val journalWriter = this.journalWriter!!
        journalWriter.writeUtf8(DIRTY)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      }
    
      internal class CallReference(
        referent: RealCall,
        /**
         * Captures the stack trace at the time the Call is executed or enqueued. This is helpful for
         * identifying the origin of connection leaks.
         */
        val callStackTrace: Any?,
      ) : WeakReference<RealCall>(referent)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  4. okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt

                  UnknownHostException(e.message).apply {
                    initCause(e)
                  },
                )
              }
            },
          )
        } catch (e: Exception) {
          // Handle any errors that might leak out
          // https://issuetracker.google.com/issues/319957694
          callback.onFailure(
            hostname,
            UnknownHostException(e.message).apply {
              initCause(e)
            },
          )
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 10:07:48 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

      }
    
      /**
       * Prunes any leaked calls and then returns the number of remaining live calls on [connection].
       * Calls are leaked if the connection is tracking them but the application code has abandoned
       * them. Leak detection is imprecise and relies on garbage collection.
       */
      private fun pruneAndGetAllocationCount(
        connection: RealConnection,
        now: Long,
      ): Int {
        connection.lock.assertHeld()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CallTest.kt

       * We used to have that behavior but it is problematic because unrelated requests end up sharing
       * credentials. Worse, that approach leaks proxy credentials to the origin server.
       */
      @Test
      fun noPreemptiveProxyAuthorization() {
        server.useHttps(handshakeCertificates.sslSocketFactory())
        server.enqueue(MockResponse(inTunnel = true))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  7. okhttp-logging-interceptor/README.md

      @Override public void log(String message) {
        Timber.tag("OkHttp").d(message);
      }
    });
    ```
    
    **Warning**: The logs generated by this interceptor when using the `HEADERS` or `BODY` levels have
    the potential to leak sensitive information such as "Authorization" or "Cookie" headers and the
    contents of request and response bodies. This data should only be logged in a controlled way or in
    a non-production environment.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  8. docs/changelogs/changelog_3x.md

        edge-case regression introduced with the events cleanup in 3.14.0.
    
     *  Fix: Provide actionable advice when the exchange is non-null. Prior to 3.14, OkHttp would
        silently leak connections when an interceptor retries without closing the response body. With
        3.14 we detect this problem but the exception was not helpful.
    
    ## Version 3.14.0
    
    _2019-03-14_
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_1x.md

     * Fix: Use strict timeouts when aborting a download.
     * Fix: Support Shoutcast HTTP responses like `ICY 200 OK`.
     * Fix: Don't unzip if there isn't a response body.
     * Fix: Don't leak gzip streams on redirects.
     * Fix: Don't do DNS lookups on invalid hosts.
     * Fix: Exhaust the underlying stream when reading gzip streams.
     * Fix: Support the `PATCH` method.
     * Fix: Support request bodies on `DELETE` method.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 6.4K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

          listener.cacheMiss(call)
        }
    
        var networkResponse: Response? = null
        try {
          networkResponse = chain.proceed(networkRequest)
        } finally {
          // If we're crashing on I/O or otherwise, don't leak the cache body.
          if (networkResponse == null && cacheCandidate != null) {
            cacheCandidate.body.closeQuietly()
          }
        }
    
        // If we have a cache response too, then we're doing a conditional get.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top