Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 126 for content_length (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/Cache.kt

          val contentLength = responseHeaders["Content-Length"]
          val cacheRequest = Request(url, varyHeaders, requestMethod)
          return Response.Builder()
            .request(cacheRequest)
            .protocol(protocol)
            .code(code)
            .message(message)
            .headers(responseHeaders)
            .body(CacheResponseBody(snapshot, contentType, contentLength))
            .handshake(handshake)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  2. cmd/admin-handlers-config-kv.go

    	if objectAPI == nil {
    		return
    	}
    
    	if r.ContentLength > maxEConfigJSONSize || r.ContentLength == -1 {
    		// More than maxConfigSize bytes were available
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigTooLarge), r.URL)
    		return
    	}
    
    	password := cred.SecretKey
    	kvBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		adminLogIf(ctx, err)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockResponseBody.kt

     * called by readers.
     */
    @ExperimentalOkHttpApi
    interface MockResponseBody {
      /** The length of this response in bytes, or -1 if unknown. */
      val contentLength: Long
    
      @Throws(IOException::class)
      fun writeTo(sink: BufferedSink)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

              expression = "content.asResponseBody(contentType, contentLength)",
              imports = ["okhttp3.ResponseBody.Companion.asResponseBody"],
            ),
          level = DeprecationLevel.WARNING,
        )
        fun create(
          contentType: MediaType?,
          contentLength: Long,
          content: BufferedSource,
        ): ResponseBody = content.asResponseBody(contentType, contentLength)
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  5. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java

            message.resetStyle().append(resource.getResourceName());
            message.style(STYLE).append(" (").append(format.format(contentLength));
    
            long duration = System.currentTimeMillis() - resource.getTransferStartTime();
            if (duration > 0L) {
                double bytesPerSecond = contentLength / (duration / 1000.0);
                message.append(" at ");
                format.format(message, (long) bytesPerSecond);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt

        return delegate
      }
    
      override fun contentType(): MediaType? {
        return delegate.contentType()
      }
    
      @Throws(IOException::class)
      override fun contentLength(): Long {
        return delegate.contentLength()
      }
    
      @Throws(IOException::class)
      override fun writeTo(sink: BufferedSink) {
        delegate.writeTo(sink)
      }
    
      override fun isDuplex(): Boolean {
        return delegate.isDuplex()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  7. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/HcHttpClient.java

                        final long contentLength = Long.parseLong(value);
                        if (contentLengthHelper != null) {
                            final long maxLength = contentLengthHelper.getMaxLength("text/plain");
                            if (contentLength > maxLength) {
                                throw new MaxLengthExceededException("The content length (" + contentLength + " byte) is over " + maxLength
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu May 09 09:29:26 UTC 2024
    - 41K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-RequestBodyCommon.kt

      byteCount: Int,
    ): RequestBody {
      checkOffsetAndCount(size.toLong(), offset.toLong(), byteCount.toLong())
      return object : RequestBody() {
        override fun contentType() = contentType
    
        override fun contentLength() = byteCount.toLong()
    
        override fun writeTo(sink: BufferedSink) {
          sink.write(this@commonToRequestBody, offset, byteCount)
        }
      }
    }
    
    @Suppress("unused")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/FormBodyTest.kt

        val expected = "sim=ple&hey=there&help=me"
        assertThat(body.contentLength()).isEqualTo(expected.length.toLong())
        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
      }
    
      @Test
      fun buildEmptyForm() {
        val body = FormBody.Builder().build()
        val expected = ""
        assertThat(body.contentLength()).isEqualTo(expected.length.toLong())
        val buffer = Buffer()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  10. internal/rest/client.go

    	req = req.WithContext(ctx)
    	if body != nil {
    		switch v := body.(type) {
    		case *bytes.Buffer:
    			req.ContentLength = int64(v.Len())
    			buf := v.Bytes()
    			req.GetBody = func() (io.ReadCloser, error) {
    				r := bytes.NewReader(buf)
    				return io.NopCloser(r), nil
    			}
    		case *bytes.Reader:
    			req.ContentLength = int64(v.Len())
    			snapshot := *v
    			req.GetBody = func() (io.ReadCloser, error) {
    				r := snapshot
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 26 12:55:01 UTC 2024
    - 14.7K bytes
    - Viewed (0)
Back to top