Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for Pattern (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

    import okio.Buffer
    
    /**
     * Quick and dirty pattern to differentiate IP addresses from hostnames. This is an approximation
     * of Android's private InetAddress#isNumeric API.
     *
     * This matches IPv6 addresses as a hex string containing at least one colon, and possibly
     * including dots after the first colon. It matches IPv4 addresses as strings containing only
     * decimal digits and dots. This pattern matches strings like "a:.23" and "54" that are neither IP
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/RecordedResponse.kt

          assertThat(messages).contains(failure!!.message)
        }
    
      fun assertFailureMatches(vararg patterns: String) =
        apply {
          val message = failure!!.message!!
          assertThat(
            patterns.firstOrNull { pattern ->
              message.matches(pattern.toRegex())
            },
          ).isNotNull()
        }
    
      fun assertSentRequestAtMillis(
        minimum: Long,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        // Confirm that the connection pool was not corrupted by making another call.
        makeSimpleCall()
      }
    
      /**
       * If the server returns a full response, it doesn't really matter if the HTTP/2 stream is reset.
       * Attempts to write the request body fails fast.
       */
      @Test
      fun serverTruncatesRequestHttp2OnDuplexRequest() {
        enableProtocol(Protocol.HTTP_2)
    
        server.enqueue(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

          hostname += "."
        }
        if (!pattern.endsWith(".")) {
          pattern += "."
        }
        // Hostname and pattern are now absolute domain names.
    
        pattern = pattern.asciiToLowercase()
        // Hostname and pattern are now in lower case -- domain names are case-insensitive.
    
        if ("*" !in pattern) {
          // Not a wildcard pattern -- hostname and pattern must match exactly.
          return hostname == pattern
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

        init {
          require(
            (pattern.startsWith("*.") && pattern.indexOf("*", 1) == -1) ||
              (pattern.startsWith("**.") && pattern.indexOf("*", 2) == -1) ||
              pattern.indexOf("*") == -1,
          ) {
            "Unexpected pattern: $pattern"
          }
    
          this.pattern =
            pattern.toCanonicalHost() ?: throw IllegalArgumentException("Invalid pattern: $pattern")
    
          when {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  6. samples/tlssurvey/src/main/kotlin/okhttp3/survey/Iana.kt

    import okio.IOException
    
    /** Example: "0x00,0x08",TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,Y,N,[RFC4346] */
    val IANA_CSV_PATTERN = "\"0x(\\w\\w),0x(\\w\\w)\",(\\w+).*".toRegex()
    
    fun parseIanaCsvRow(s: String): SuiteId? {
      if (s.contains("Reserved") || s.contains("Unassigned")) return null
      val matcher = IANA_CSV_PATTERN.matchEntire(s) ?: return null
      val id = (matcher.groupValues[1] + matcher.groupValues[2]).decodeHex()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

        for (entry in lruEntries.values.toTypedArray()) {
          removeEntry(entry)
        }
        mostRecentTrimFailed = false
      }
    
      private fun validateKey(key: String) {
        require(LEGAL_KEY_PATTERN.matches(key)) { "keys must match regex [a-z0-9_-]{1,120}: \"$key\"" }
      }
    
      /**
       * Returns an iterator over the cache's current entries. This iterator doesn't throw
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  8. okhttp/src/main/resources/META-INF/native-image/okhttp/okhttp/resource-config.json

    {
      "resources": [
        {"pattern": "okhttp3/internal/publicsuffix/publicsuffixes.gz"}
      ]
    Json
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 92 bytes
    - Viewed (0)
  9. native-image-tests/src/main/resources/META-INF/native-image/okhttp/nit/resource-config.json

    {
      "resources": [
        {"pattern": "testlist.txt"},
        {"pattern": "web-platform-test-urltestdata.txt"}
      ]
    Json
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Jul 28 12:56:04 GMT 2021
    - 110 bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CertificatePinnerKotlinTest.kt

          )
        assertEquals("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=".decodeBase64(), pin.hash)
        assertEquals("sha256", pin.hashAlgorithm)
        assertEquals("**.example.co.uk", pin.pattern)
        assertTrue(pin.matchesHostname("www.example.co.uk"))
        assertTrue(pin.matchesHostname("gopher.example.co.uk"))
        assertFalse(pin.matchesHostname("www.example.com"))
      }
    
      @Test fun testMatchesSha256() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.1K bytes
    - Viewed (0)
Back to top