Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for contentLength (0.3 sec)

  1. src/main/resources/crawler/contentlength.xml

    Shinsuke Sugaya <******@****.***> 1444546274 +0900
    XML
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Sun Oct 11 06:51:14 GMT 2015
    - 561 bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          !response.promisesBody() -> newFixedLengthSource(0)
          response.isChunked -> newChunkedSource(response.request.url)
          else -> {
            val contentLength = response.headersContentLength()
            if (contentLength != -1L) {
              newFixedLengthSource(contentLength)
            } else {
              newUnknownLengthSource()
            }
          }
        }
      }
    
      override fun trailers(): Headers {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt

      sizeMapper: (T) -> Int,
    ): T {
      val contentLength = contentLength()
      if (contentLength > Int.MAX_VALUE) {
        throw IOException("Cannot buffer entire body for content length: $contentLength")
      }
    
      val bytes = source().use(consumer)
      val size = sizeMapper(bytes)
      if (contentLength != -1L && contentLength != size.toLong()) {
        throw IOException("Content-Length ($contentLength) and stream length ($size) disagree")
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/Progress.java

            if (done) {
              System.out.println("completed");
            } else {
              if (firstUpdate) {
                firstUpdate = false;
                if (contentLength == -1) {
                  System.out.println("content-length: unknown");
                } else {
                  System.out.format("content-length: %d\n", contentLength);
                }
              }
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

      fun createRequestBody(
        request: Request,
        duplex: Boolean,
      ): Sink {
        this.isDuplex = duplex
        val contentLength = request.body!!.contentLength()
        eventListener.requestBodyStart(call)
        val rawRequestBody = codec.createRequestBody(request, contentLength)
        return RequestBodySink(rawRequestBody, contentLength)
      }
    
      @Throws(IOException::class)
      fun flushRequest() {
        try {
          codec.flushRequest()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.2K bytes
    - Viewed (2)
  6. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          }
    
          // We can't measure the body's size without the sizes of its components.
          val contentLength = body.contentLength()
          if (contentLength == -1L && countBytes) {
            byteCountBuffer!!.clear()
            return -1L
          }
    
          sink.write(CRLF)
    
          if (countBytes) {
            byteCount += contentLength
          } else {
            body.writeTo(sink)
          }
    
          sink.write(CRLF)
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

    import okio.Source
    import okio.Timeout
    import okio.buffer
    
    internal class UnreadableResponseBody(
      private val mediaType: MediaType?,
      private val contentLength: Long,
    ) : ResponseBody(), Source {
      override fun contentType() = mediaType
    
      override fun contentLength() = contentLength
    
      override fun source() = buffer()
    
      override fun read(
        sink: Buffer,
        byteCount: Long,
      ): Long {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  8. cmd/auth-handler_test.go

    		}
    	}
    }
    
    // Provides a fully populated http request instance, fails otherwise.
    func mustNewRequest(method string, urlStr string, contentLength int64, body io.ReadSeeker, t *testing.T) *http.Request {
    	req, err := newTestRequest(method, urlStr, contentLength, body)
    	if err != nil {
    		t.Fatalf("Unable to initialize new http request %s", err)
    	}
    	return req
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  9. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

            throw e
          }
    
          val tookMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs)
    
          val responseBody = response.body!!
          val contentLength = responseBody.contentLength()
          val bodySize = if (contentLength != -1L) "$contentLength-byte" else "unknown-length"
          logger.log(
            buildString {
              append("<-- ${response.code}")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  10. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

        val closed = AtomicBoolean()
        val body: ResponseBody =
          object : ResponseBody() {
            override fun contentType(): MediaType? {
              return null
            }
    
            override fun contentLength(): Long {
              return 5
            }
    
            override fun source(): BufferedSource {
              val source = Buffer().writeUtf8("hello")
              return object : ForwardingSource(source) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
Back to top