Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for regex (0.17 sec)

  1. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

        }
        assertThat(recorded.headers["HTTP2-Settings"]).isNotNull()
        assertThat(recorded.headers["Upgrade"]).isEqualTo("h2c") // HTTP/2 over plaintext!
        assertThat(recorded.headers["User-Agent"]!!).matches(Regex("Java-http-client/.*"))
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  2. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

          .assertLogMatch(Regex("""User-Agent: okhttp/.+"""))
          .assertLogEqual("--> END GET")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms\)"""))
          .assertLogEqual("Content-Type: text/html; charset=0")
          .assertLogMatch(Regex("""Content-Length: \d+"""))
          .assertLogMatch(Regex(""))
          .assertLogEqual("Body with unknown charset")
          .assertLogMatch(Regex("""<-- END HTTP \(\d+ms, 25-byte body\)"""))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

        assertThat(certificate.getSubjectX500Principal().name, "self-signed")
          .isEqualTo(certificate.getIssuerX500Principal().name)
        assertThat(certificate.getIssuerX500Principal().name).matches(Regex("CN=[0-9a-f-]{36}"))
        assertThat(certificate.serialNumber).isEqualTo(BigInteger.ONE)
        assertThat(certificate.subjectAlternativeNames).isNull()
        val deltaMillis = 1000.0
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

          .assertLogMatch(Regex("""callStart: Request\{method=POST, url=$url\}"""))
          .assertLogMatch(Regex("""proxySelectStart: $url"""))
          .assertLogMatch(Regex("""proxySelectEnd: \[DIRECT]"""))
          .assertLogMatch(Regex("""dnsStart: ${url.host}"""))
          .assertLogMatch(Regex("""dnsEnd: \[.+]"""))
          .assertLogMatch(Regex("""connectStart: ${url.host}/.+ DIRECT"""))
          .assertLogMatch(Regex("""connectEnd: http/1.1"""))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

          |--simple boundary
          |
          |abcd
          |--simple boundary
          |
          |efgh
          |--simple boundary--
          """.trimMargin()
            .replace("\n", "\r\n")
            .replace(Regex("(?m)abcd\r\n"), "abcd\n")
    
        val parts =
          MultipartReader(
            boundary = "simple boundary",
            source = Buffer().writeUtf8(multipart),
          )
    
        val part = parts.nextPart()!!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

          }
        }
    
        companion object {
          private const val DEFAULT_DURATION_MILLIS = 1000L * 60 * 60 * 24 // 24 hours.
        }
      }
    
      companion object {
        private val PEM_REGEX = Regex("""-----BEGIN ([!-,.-~ ]*)-----([^-]*)-----END \1-----""")
    
        /**
         * Decodes a multiline string that contains both a [certificate][certificatePem] and a
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  7. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

            .toSet()
    
        // It's safe to assume all platforms will have a major Internet certificate issuer.
        assertThat(names).matchesPredicate { strings ->
          strings.any { it.matches(Regex("[A-Z]+=Entrust.*")) }
        }
      }
    
      private fun startTlsServer(): InetSocketAddress {
        val serverSocketFactory = ServerSocketFactory.getDefault()
        serverSocket = serverSocketFactory.createServerSocket()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

    internal fun MediaType.commonHashCode(): Int = mediaType.hashCode()
    
    private const val TOKEN = "([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)"
    private const val QUOTED = "\"([^\"]*)\""
    private val TYPE_SUBTYPE = Regex("$TOKEN/$TOKEN")
    private val PARAMETER = Regex(";\\s*(?:$TOKEN=(?:$TOKEN|$QUOTED))?")
    
    /**
     * Returns a media type for this string.
     *
     * @throws IllegalArgumentException if this is not a well-formed media type.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/WebPlatformUrlTestData.kt

          while (true) {
            val line = source.readUtf8Line() ?: break
            if (line.isEmpty() || line.startsWith("#")) continue
    
            var i = 0
            val parts = line.split(Regex(" ")).toTypedArray()
    
            val element = WebPlatformUrlTestData()
            element.input = unescape(parts[i++])
    
            val base = if (i < parts.size) parts[i++] else null
            element.base =
              when {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

    import okio.Closeable
    import okio.FileNotFoundException
    import okio.FileSystem
    import okio.IOException
    import okio.Options
    import okio.Path
    import okio.use
    
    // TODO: migrate callers to [Regex.matchAt] when that API is not experimental.
    internal fun Regex.matchAtPolyfill(
      input: CharSequence,
      index: Int,
    ): MatchResult? {
      val candidate = find(input, index) ?: return null
    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)
Back to top