Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for bomb (0.13 sec)

  1. okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/DecompressionBombChecker.kt

            if (result != -1L) {
              outputByteCount += result
    
              if (outputByteCount > inputByteCount * maxRatio) {
                throw IOException(
                  "decompression bomb? outputByteCount=$outputByteCount, " +
                    "inputByteCount=$inputByteCount exceeds max ratio of $maxRatio",
                )
              }
            }
    
            return result
          }
        }
      }
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 29 22:50:20 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. okhttp-brotli/src/test/java/okhttp3/brotli/BrotliBombTest.kt

        assertFailure {
          uncompressed.body.string()
        }.isInstanceOf<IOException>()
          .message()
          .isNotNull()
          .matches(
            Regex(
              "decompression bomb\\? outputByteCount=\\d+, inputByteCount=\\d+ exceeds max ratio of 100",
            ),
          )
      }
    
      /** Returns a ByteString that expands to 10 GiB when Brotli-decompressed. */
      private fun readBrotli10G(): ByteString {
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 29 22:50:20 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  3. docs/changelogs/changelog_4x.md

     *  New: Publish a [bill of materials (BOM)][bom] for OkHttp. Depend on this from Gradle or Maven to
        keep all of your OkHttp artifacts on the same version, even if they're declared via transitive
        dependencies. You can even omit versions when declaring other OkHttp dependencies.
    
        ```kotlin
        dependencies {
           api(platform("com.squareup.okhttp3:okhttp-bom:4.4.0"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

       */
      @Throws(IOException::class)
      fun byteString() = commonByteString()
    
      /**
       * Returns the response as a character stream.
       *
       * If the response starts with a
       * [Byte Order Mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark), it is consumed and
       * used to determine the charset of the response bytes.
       *
       * Otherwise if the response has a `Content-Type` header that specifies a charset, that is used
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

      vararg args: Any,
    ): String {
      return String.format(Locale.US, format, *args)
    }
    
    @Throws(IOException::class)
    internal fun BufferedSource.readBomAsCharset(default: Charset): Charset {
      return when (select(UNICODE_BOMS)) {
        0 -> UTF_8
        1 -> UTF_16BE
        2 -> UTF_16LE
        3 -> UTF_32BE
        4 -> UTF_32LE
        -1 -> default
        else -> throw AssertionError()
      }
    }
    
    internal fun checkDuration(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. build.gradle.kts

            ignoreAttribute("Bnd-LastModified")
          }
        }
      }
    }
    
    /** Configure building for Java+Kotlin projects. */
    subprojects {
      val project = this@subprojects
      if (project.name == "okhttp-bom") return@subprojects
    
      if (project.name == "okhttp-android") return@subprojects
      if (project.name == "android-test") return@subprojects
      if (project.name == "regression-test") return@subprojects
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:32:42 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/InterceptorTest.kt

          val originalRequest = chain.request()
          val originalResponse =
            chain.proceed(
              originalRequest.newBuilder()
                .addHeader("Request-Interceptor", "Bob") // 2. Added second.
                .build(),
            )
          originalResponse.newBuilder()
            .addHeader("Response-Interceptor", "Cupcake") // 3. Added third.
            .build()
        }
        val request =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

      if (candidate.range.first != index) return null // Didn't match where it should have.
      return candidate
    }
    
    @JvmField
    val EMPTY_BYTE_ARRAY: ByteArray = ByteArray(0)
    
    /** Byte order marks. */
    internal val UNICODE_BOMS =
      Options.of(
        // UTF-8.
        "efbbbf".decodeHex(),
        // UTF-16BE.
        "feff".decodeHex(),
        // UTF-16LE.
        "fffe".decodeHex(),
        // UTF-32BE.
        "0000ffff".decodeHex(),
        // UTF-32LE.
    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)
  9. docs/changelogs/changelog_3x.md

        literals are now Huffman-encoded.
     *  New: Expose `Part` headers and body in `Multipart`.
     *  New: Make `ResponseBody.string()` and `ResponseBody.charStream()` BOM-aware. If your HTTP
        response body begins with a [byte order mark][bom] it will be consumed and used to select a
        charset for the remaining bytes. Most applications should not need a byte order mark.
    
     *  New: Upgrade to Okio 1.11.0.
    
         ```xml
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
  10. README.md

    Also, we have a [bill of materials (BOM)][bom] available to help you keep OkHttp artifacts up to date and be sure about version compatibility.
    
    ```kotlin
        dependencies {
           // define a BOM and its version
           implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))
    
           // define any required OkHttp artifacts without version
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 6.2K bytes
    - Viewed (0)
Back to top