Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for rule (0.24 sec)

  1. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

            while (!source.exhausted()) {
              var rule: ByteString = source.readUtf8LineStrict().toRule() ?: continue
    
              if (rule.startsWith(EXCEPTION_RULE_MARKER)) {
                rule = rule.substring(1)
                // We use '\n' for end of value.
                totalExceptionRuleBytes += rule.size + 1
                sortedExceptionRules.add(rule)
              } else {
                totalRuleBytes += rule.size + 1 // We use '\n' for end of value.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

    internal fun String.containsInvalidHostnameAsciiCodes(): Boolean {
      for (i in 0 until length) {
        val c = this[i]
        // The WHATWG Host parsing rules accepts some character codes which are invalid by
        // definition for OkHttp's host header checks (and the WHATWG Host syntax definition). Here
        // we rule out characters that would cause problems in host headers.
        if (c <= '\u001f' || c >= '\u007f') {
          return true
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  3. mockwebserver-junit4/src/main/kotlin/mockwebserver3/junit4/MockWebServerRule.kt

    import mockwebserver3.MockWebServer
    import okhttp3.ExperimentalOkHttpApi
    import org.junit.rules.ExternalResource
    
    /**
     * Runs MockWebServer for the duration of a single test method.
     *
     * In Java JUnit 4 tests (ie. tests annotated `@org.junit.Test`), use this by defining a field with
     * the `@Rule` annotation:
     *
     * ```java
     * @Rule public final MockWebServerRule serverRule = new MockWebServerRule();
     * ```
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.8K bytes
    - Viewed (1)
  4. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

        val rule = findMatchingRule(domainLabels)
        if (domainLabels.size == rule.size && rule[0][0] != EXCEPTION_MARKER) {
          return null // The domain is a public suffix.
        }
    
        val firstLabelOffset =
          if (rule[0][0] == EXCEPTION_MARKER) {
            // Exception rules hold the effective TLD plus one.
            domainLabels.size - rule.size
          } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  5. mockwebserver-junit4/README.md

    ```
    @Rule public final MockWebServerRule serverRule = new MockWebServerRule();
    ```
    
    The `serverRule` field has a `server` field. It is an instance of `MockWebServer`. That instance
    will be shut down automatically after the test runs.
    
    For Kotlin, the `@JvmField` annotation is also necessary:
    
    ```
    @JvmField @Rule val serverRule = MockWebServerRule()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 707 bytes
    - Viewed (1)
  6. mockwebserver-junit4/src/test/java/mockwebserver3/junit4/MockWebServerRuleTest.kt

    class MockWebServerRuleTest {
      @Test fun statementStartsAndStops() {
        val rule = MockWebServerRule()
        val called = AtomicBoolean()
        val statement: Statement =
          rule.apply(
            object : Statement() {
              override fun evaluate() {
                called.set(true)
                rule.server.url("/").toUrl().openConnection().connect()
              }
            },
            Description.EMPTY,
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (1)
  7. okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt

    import org.junit.AssumptionViolatedException
    import org.junit.Before
    import org.junit.Ignore
    import org.junit.Rule
    import org.junit.Test
    
    /**
     * Run with "./gradlew :android-test:connectedCheck -PandroidBuild=true" and make sure ANDROID_SDK_ROOT is set.
     */
    class AndroidAsyncDnsTest {
      @JvmField @Rule
      val serverRule = MockWebServerRule()
      private lateinit var client: OkHttpClient
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  8. docs/contribute/concurrency.md

    Similarly, the reader thread must never block on writing because this can deadlock the connection. Consider a client and server that both violate this rule. If you get unlucky, they could fill up their TCP buffers (so that writes block) and then use their reader threads to write a frame. Nobody is reading on either end, and the buffers are never drained.
    
    #### Do-stuff-later pool
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  9. mockwebserver-junit4/api/mockwebserver3-junit4.api

    public final class mockwebserver3/junit4/MockWebServerRule : org/junit/rules/ExternalResource {
    	public static final field Companion Lmockwebserver3/junit4/MockWebServerRule$Companion;
    	public fun <init> ()V
    	public final fun getServer ()Lmockwebserver3/MockWebServer;
    }
    
    public final class mockwebserver3/junit4/MockWebServerRule$Companion {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Feb 26 19:17:33 GMT 2022
    - 346 bytes
    - Viewed (0)
  10. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

     *
     * This implementation is optimized for readability over efficiency.
     *
     * This implements non-transitional processing by preserving deviation characters.
     *
     * This implementation's STD3 rules are configured to `UseSTD3ASCIIRules=false`. This is
     * permissive and permits the `_` character.
     *
     * [mapping table]: https://www.unicode.org/reports/tr46/#IDNA_Mapping_Table
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
Back to top