Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Commit (0.23 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        val fileOperator = FileOperator(file!!.channel)
        fileOperator.write(FILE_HEADER_SIZE + upstreamSize, metadataBuffer, metadata.size.toLong())
      }
    
      @Throws(IOException::class)
      fun commit(upstreamSize: Long) {
        // Write metadata to the end of the file.
        writeMetadata(upstreamSize)
        file!!.channel.force(false)
    
        // Once everything else is in place we can swap the dirty header for a clean one.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        val k1Creator = cache.edit("k1")!!
        k1Creator.setString(0, "AB")
        k1Creator.setString(1, "C")
        k1Creator.commit()
        val k2Creator = cache.edit("k2")!!
        k2Creator.setString(0, "DEF")
        k2Creator.setString(1, "G")
        k2Creator.commit()
        val k1Snapshot = cache["k1"]!!
        k1Snapshot.close()
        cache.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Cache.kt

        var editor: DiskLruCache.Editor? = null
        try {
          editor = snapshot.edit() ?: return // edit() returns null if snapshot is not current.
          entry.writeTo(editor)
          editor.commit()
        } catch (_: IOException) {
          abortQuietly(editor)
        }
      }
    
      private fun abortQuietly(editor: DiskLruCache.Editor?) {
        // Give up because the cache cannot be written.
        try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

        assertThat(verifier.verify("foo.com", session)).isTrue()
        assertThat(verifier.verify("bar.com", session)).isFalse()
      }
    
      @Test fun specialKInHostname() {
        // https://github.com/apache/httpcomponents-client/commit/303e435d7949652ea77a6c50df1c548682476b6e
        // https://www.gosecure.net/blog/2020/10/27/weakness-in-java-tls-host-verification/
        val heldCertificate =
          HeldCertificate.Builder()
            .commonName("Foo Corp")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 40.3K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

     *    default to their previous value.
     *
     * Every [edit] call must be matched by a call to [Editor.commit] or [Editor.abort]. Committing is
     * atomic: a read observes the full set of values as they were before or after the commit, but never
     * a mix of values.
     *
     * Clients call [get] to read a snapshot of an entry. The read will observe the value at the time
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

     * true for systems like Mac, Unix, and Linux that use inodes in their file system interface. It is
     * typically false on Windows.
     *
     * If this returns false we won't permit simultaneous reads and writes. When writes commit we need
     * to delete the previous snapshots, and that won't succeed if the file is open. (We do permit
     * multiple simultaneous reads.)
     *
     * @param file a file in the directory to check. This file shouldn't already exist!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  7. docs/changelogs/changelog_4x.md

     *  New: Publish a [bill of materials (BOM)][bom] for OkHttp. Depend on this from Gradle or Maven to
        keep all of your OkHttp artifacts on the same version, even if they're declared via transitive
        dependencies. You can even omit versions when declaring other OkHttp dependencies.
    
        ```kotlin
        dependencies {
           api(platform("com.squareup.okhttp3:okhttp-bom:4.4.0"))
           api("com.squareup.okhttp3:okhttp")              // No version!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

        Adapters.usingTypeHint { typeHint ->
          when (typeHint) {
            // This type is pretty strange. The spec says that for certain algorithms we must encode null
            // when it is present, and for others we must omit it!
            // https://tools.ietf.org/html/rfc4055#section-2.1
            ObjectIdentifiers.SHA256_WITH_RSA_ENCRYPTION -> Adapters.NULL
            ObjectIdentifiers.RSA_ENCRYPTION -> Adapters.NULL
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.6K bytes
    - Viewed (1)
  9. okhttp/src/main/kotlin/okhttp3/internal/tls/CertificateChainCleaner.kt

     * certificate is signed by the certificate that follows, and the last certificate is a trusted CA
     * certificate.
     *
     * Use of the chain cleaner is necessary to omit unexpected certificates that aren't relevant to
     * the TLS handshake and to extract the trusted CA certificate for the benefit of certificate
     * pinning.
     */
    abstract class CertificateChainCleaner {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  10. CHANGELOG.md

     *  New: `Request.Builder.cacheUrlOverride()` customizes the cache key used for a request. This can
        be used to make canonical URLs for the cache that omit insignificant query parameters or other
        irrelevant data.
    
        This feature may be used with `POST` requests to cache their responses. In such cases the
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
Back to top