Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for parser (0.15 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

          assertThat(expected).hasMessage("Failed to parse UTCTime 191216#30210Z")
        }
      }
    
      @Test fun `cannot decode generalized time with offset`() {
        assertFailsWith<ProtocolException> {
          Adapters.GENERALIZED_TIME.fromDer("181332303139313231353139303231302d30383030".decodeHex())
        }.also { expected ->
          assertThat(expected).hasMessage("Failed to parse GeneralizedTime 20191215190210-0800")
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

          if (input.startsWith(":", startIndex = i)) {
            i++
          } else if (input.startsWith(".", startIndex = i)) {
            // If we see a '.', rewind to the beginning of the previous group and parse as IPv4.
            if (!decodeIpv4Suffix(input, groupOffset, limit, address, b - 2)) return null
            b += 2 // We rewound two bytes and then added four.
            break
          } else {
    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. okhttp/src/test/resources/web-platform-test-urltestdata.txt

    # FORMAT NOT DOCUMENTED YET (parser is urltestparser.js)
    
    # Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js
    http://example\t.\norg http://example.org/foo/bar s:http h:example.org p:/
    http://user:pass@foo:21/bar;par?b#c  s:http u:user pass:pass h:foo port:21 p:/bar;par q:?b f:#c
    http:foo.com  s:http h:example.org p:/foo/foo.com
    \t\s\s\s:foo.com\s\s\s\n  s:http h:example.org p:/foo/:foo.com
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CookiesTest.kt

    import java.net.HttpCookie
    import java.net.HttpURLConnection
    import java.net.InetAddress
    import java.net.URI
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.Cookie.Companion.parse
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.java.net.cookiejar.JavaNetCookieJar
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.Timeout
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Headers.kt

       * Returns the last value corresponding to the specified field parsed as an HTTP date, or null if
       * either the field is absent or cannot be parsed as a date.
       */
      fun getDate(name: String): Date? = get(name)?.toHttpDateOrNull()
    
      /**
       * Returns the last value corresponding to the specified field parsed as an HTTP date, or null if
       * either the field is absent or cannot be parsed as a date.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

    import okhttp3.ResponseBody.Companion.toResponseBody
    import okio.Buffer
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    
    @Tag("Slowish")
    class MultipartReaderTest {
      @Test fun `parse multipart`() {
        val multipart =
          """
          |--simple boundary
          |Content-Type: text/plain; charset=utf-8
          |Content-ID: abc
          |
          |abcd
          |efgh
          |--simple boundary
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Cache.kt

     *         .maxStale(365, TimeUnit.DAYS)
     *         .build())
     *     .url("http://publicobject.com/helloworld.txt")
     *     .build();
     * ```
     *
     * The [CacheControl] class can configure request caching directives and parse response caching
     * directives. It even offers convenient constants [CacheControl.FORCE_NETWORK] and
     * [CacheControl.FORCE_CACHE] that address the use cases above.
     *
     * [rfc_7234]: http://tools.ietf.org/html/rfc7234
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

            timeZone = utc
            set2DigitYearStart(Date(-631152000000L)) // 1950-01-01T00:00:00Z.
          }
    
        try {
          val parsed = dateFormat.parse(string)
          return parsed.time
        } catch (e: ParseException) {
          throw ProtocolException("Failed to parse UTCTime $string")
        }
      }
    
      internal fun formatUtcTime(date: Long): String {
        val utc = TimeZone.getTimeZone("GMT")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

            state == STATE_WRITING_REQUEST_BODY ||
            state == STATE_READ_RESPONSE_HEADERS,
        ) {
          "state: $state"
        }
    
        try {
          val statusLine = StatusLine.parse(headersReader.readLine())
    
          val responseBuilder =
            Response.Builder()
              .protocol(statusLine.protocol)
              .code(statusLine.code)
              .message(statusLine.message)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

      }
    
      /**
       * Ignored due to incompatibilities between Android and Java on how non-ASCII subject alt names
       * are parsed. Android fails to parse these, which means we fall back to the CN. The RI does parse
       * them, so the CN is unused.
       */
      @Test fun verifyNonAsciiSubjectAlt() {
        // Expecting actual:
        //  ["bar.com", "花子.co.jp"]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 40.3K bytes
    - Viewed (0)
Back to top