Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for dayjs (0.21 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

        // with MD5 or 512-bit RSA; that's insecure!
        //
        // openssl req \
        //   -x509 \
        //   -md5 \
        //   -nodes \
        //   -days 1 \
        //   -newkey rsa:512 \
        //   -keyout privateKey.key \
        //   -out certificate.crt
        val certificatePem =
          """
          |-----BEGIN CERTIFICATE-----
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CacheTest.kt

        //      last modified: 105 days ago
        //             served:   5 days ago
        //   default lifetime: (105 - 5) / 10 = 10 days
        //            expires:  10 days from served date = 5 days from now
        server.enqueue(
          MockResponse.Builder()
            .addHeader("Last-Modified: " + formatDate(-105, TimeUnit.DAYS))
            .addHeader("Date: " + formatDate(-5, TimeUnit.DAYS))
            .body("A")
            .build(),
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CacheControlJvmTest.kt

            .maxAge(2, TimeUnit.DAYS)
            .build()
        assertThat(cacheControl.toString()).isEqualTo("max-age=172800")
        assertThat(cacheControl.toString()).isSameAs(cacheControl.toString())
      }
    
      @Test
      @Throws(Exception::class)
      fun timeDurationTruncatedToMaxValue() {
        val cacheControl =
          CacheControl.Builder()
            .maxAge(365 * 100, TimeUnit.DAYS) // Longer than Integer.MAX_VALUE seconds.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Cache.kt

     * seconds:
     *
     * ```java
     * Request request = new Request.Builder()
     *     .cacheControl(new CacheControl.Builder()
     *         .maxStale(365, TimeUnit.DAYS)
     *         .build())
     *     .url("http://publicobject.com/helloworld.txt")
     *     .build();
     * ```
     *
     * The [CacheControl] class can configure request caching directives and parse response caching
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

        // [distinguished_name]
        // [req_extensions]
        // [x509_extensions]
        // subjectAltName=DNS:localhost.localdomain,DNS:localhost,IP:127.0.0.1
        //
        // $ openssl req -x509 -nodes -days 36500 -subj '/CN=localhost' -config ./cert.cnf \
        //     -newkey rsa:512 -out cert.pem
        val certificate =
          certificate(
            """
            -----BEGIN CERTIFICATE-----
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 40.3K bytes
    - Viewed (0)
Back to top