Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ofMapRejectsNullCharInName (0.13 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/HeadersTest.kt

        namesAndValues["User-Agent"] = "OkHttp"
        val headers = namesAndValues.toHeaders()
        namesAndValues["User-Agent"] = "Chrome"
        assertThat(headers.value(0)).isEqualTo("OkHttp")
      }
    
      @Test fun ofMapRejectsNullCharInName() {
        assertFailsWith<IllegalArgumentException> {
          mapOf("User-\u0000Agent" to "OkHttp").toHeaders()
        }
      }
    
      @Test fun ofMapRejectsNullCharInValue() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 8.7K bytes
    - Viewed (0)
Back to top