Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Round (0.22 sec)

  1. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt

    import okio.Buffer
    import org.junit.jupiter.api.Assumptions.assumeFalse
    import org.junit.jupiter.params.ParameterizedTest
    import org.junit.jupiter.params.provider.ArgumentsSource
    
    /**
     * Tests for round-tripping headers through hpack.
     *
     * TODO: update hpack-test-case with the output of our encoder.
     * This test will hide complementary bugs in the encoder and decoder,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt

        var bitCount = 0L
    
        for (i in 0 until bytes.size) {
          val byteIn = bytes[i] and 0xff
          bitCount += CODE_BIT_COUNTS[byteIn].toLong()
        }
    
        return ((bitCount + 7) shr 3).toInt() // Round up to an even byte.
      }
    
      fun decode(
        source: BufferedSource,
        byteCount: Long,
        sink: BufferedSink,
      ) {
        var node = root
        var accumulator = 0
        var accumulatorBitCount = 0
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

      /** Confirm that the thread does not hold a lock on `lock` during the callback. */
      fun forbidLock(lock: Any) {
        forbiddenLocks.add(lock)
      }
    
      /**
       * Removes recorded events up to (and including) an event is found whose class equals [eventClass]
       * and returns it.
       */
      fun <T : ConnectionEvent> removeUpToEvent(eventClass: Class<T>): T {
        val fullEventSequence = eventSequence.toList()
        try {
          while (true) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackDecodeTestBase.kt

            testCase.headersList,
            hpackReader.getAndResetHeaderList(),
          )
        }
      }
    
      companion object {
        /**
         * Reads all stories in the folders provided, asserts if no story found.
         */
        @JvmStatic
        protected fun createStories(interopTests: Array<String>): List<Any> {
          if (interopTests.isEmpty()) return listOf<Any>(Story.MISSING)
    
          val result = mutableListOf<Any>()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  5. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        } catch (FileNotFoundException e) {
          return new MockResponse()
              .setStatus("HTTP/1.1 404")
              .addHeader("content-type: text/plain; charset=utf-8")
              .setBody("NOT FOUND: " + path);
        } catch (IOException e) {
          return new MockResponse()
              .setStatus("HTTP/1.1 500")
              .addHeader("content-type: text/plain; charset=utf-8")
              .setBody("SERVER ERROR: " + e);
        }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  6. docs/changelogs/changelog_4x.md

        are currently being read or written. On Windows the file system forbids this so we must be more
        careful when deleting and renaming files.
    
     *  Fix: Don't crash on Java 8u252 which introduces an API previously found only on Java 9 and
        above. See [Jetty's overview][jetty_8_252] of the API change and its consequences.
    
     *  New: `MultipartReader` is a streaming decoder for [MIME multipart (RFC 2045)][rfc_2045]
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Protocol.kt

       * Servers that enforce this may send an exception message including the string
       * `INADEQUATE_SECURITY`.
       */
      HTTP_2("h2"),
    
      /**
       * Cleartext HTTP/2 with no "upgrade" round trip. This option requires the client to have prior
       * knowledge that the server supports cleartext HTTP/2.
       *
       * See also [Starting HTTP/2 with Prior Knowledge][rfc_7540_34].
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:17:33 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/guide/PostExample.java

          return response.body().string();
        }
      }
    
      String bowlingJson(String player1, String player2) {
        return "{'winCondition':'HIGH_SCORE',"
            + "'name':'Bowling',"
            + "'round':4,"
            + "'lastSaved':1367702411696,"
            + "'dateStarted':1367702378785,"
            + "'players':["
            + "{'name':'" + player1 + "','history':[10,8,6,7,8],'color':-13388315,'total':39},"
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

          )
    
        assertFailsWith<EOFException> {
          parts.nextPart()
        }
      }
    
      /** Confirm that [MultipartBody] and [MultipartReader] can work together. */
      @Test fun `multipart round trip`() {
        val body =
          MultipartBody.Builder("boundary")
            .setType(MultipartBody.PARALLEL)
            .addPart("Quick".toRequestBody("text/plain".toMediaType()))
            .addFormDataPart("color", "Brown")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/RecordedResponse.kt

      }
    
      fun assertFailure(vararg allowedExceptionTypes: Class<*>) =
        apply {
          var found = false
          for (expectedClass in allowedExceptionTypes) {
            if (expectedClass.isInstance(failure)) {
              found = true
              break
            }
          }
          assertThat(
            found,
            "Expected exception type among ${allowedExceptionTypes.contentToString()}, got $failure",
          ).isTrue()
    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)
Back to top