Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 126 for content_length (0.18 sec)

  1. cmd/admin-handlers_test.go

    func buildAdminRequest(queryVal url.Values, method, path string,
    	contentLength int64, bodySeeker io.ReadSeeker) (*http.Request, error,
    ) {
    	req, err := newTestRequest(method,
    		adminPathPrefix+adminAPIVersionPrefix+path+"?"+queryVal.Encode(),
    		contentLength, bodySeeker)
    	if err != nil {
    		return nil, err
    	}
    
    	cred := globalActiveCred
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  2. cmd/bucket-notification-handlers.go

    		return
    	}
    
    	// PutBucketNotification always needs a Content-Length.
    	if r.ContentLength <= 0 {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingContentLength), r.URL)
    		return
    	}
    
    	config, err := event.ParseConfig(io.LimitReader(r.Body, r.ContentLength), globalSite.Region, globalEventNotifier.targetList)
    	if err != nil {
    		apiErr := errorCodes.ToAPIErr(ErrMalformedXML)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/InterceptorTest.kt

        return object : RequestBody() {
          override fun contentType(): MediaType? {
            return original!!.contentType()
          }
    
          override fun contentLength(): Long {
            return original!!.contentLength()
          }
    
          override fun writeTo(sink: BufferedSink) {
            val uppercase = uppercase(sink)
            val bufferedSink = uppercase.buffer()
    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)
  4. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

            throw IOException("response: " + response.code + " " + response.message)
          }
    
          val body = response.body
    
          if (body.contentLength() > MAX_RESPONSE_SIZE) {
            throw IOException(
              "response size exceeds limit ($MAX_RESPONSE_SIZE bytes): ${body.contentLength()} bytes",
            )
          }
    
          val responseBytes = body.source().readByteString()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  5. cmd/acl-handlers.go

    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	aclHeader := r.Header.Get(xhttp.AmzACL)
    	if aclHeader == "" {
    		acl := &accessControlPolicy{}
    		if err = xmlDecoder(r.Body, acl, r.ContentLength); err != nil {
    			if terr, ok := err.(*xml.SyntaxError); ok && terr.Msg == io.EOF.Error() {
    				writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMalformedXML),
    					r.URL)
    				return
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val name: String = formBody.name(0)
        val encodedValue: String = formBody.encodedValue(0)
        val value: String = formBody.value(0)
        val contentType: MediaType = formBody.contentType()
        val contentLength: Long = formBody.contentLength()
        formBody.writeTo(Buffer())
        val requestBody: RequestBody = formBody
      }
    
      @Test
      fun formBodyBuilder() {
        var builder: FormBody.Builder = FormBody.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  7. okhttp-coroutines/src/test/kotlin/okhttp3/SuspendCallTest.kt

            .protocol(Protocol.HTTP_1_1)
            .message("OK")
            .code(200)
            .body(
              object : ResponseBody() {
                override fun contentType() = null
    
                override fun contentLength() = -1L
    
                override fun source() =
                  object : ForwardingSource(Buffer()) {
                    override fun close() {
                      responseClosed = true
                    }
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Fri Apr 05 11:25:23 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  8. cmd/handler-utils.go

    	// we do not have to validate location constraint. Bucket will
    	// be created at default region.
    	locationConstraint := createBucketLocationConfiguration{}
    	err := xmlDecoder(r.Body, &locationConstraint, r.ContentLength)
    	if err != nil && r.ContentLength != 0 {
    		internalLogOnceIf(GlobalContext, err, "location-constraint-xml-parsing")
    		// Treat all other failures as XML parsing errors.
    		return "", ErrMalformedXML
    	} // else for both err as nil or io.EOF
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.5K bytes
    - Viewed (3)
  9. cmd/admin-handlers-idp-ldap.go

    	}
    
    	// fail if ldap is not enabled
    	if !globalIAMSys.LDAPConfig.Enabled() {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminLDAPNotEnabled), r.URL)
    		return
    	}
    
    	if r.ContentLength > maxEConfigJSONSize || r.ContentLength == -1 {
    		// More than maxConfigSize bytes were available
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigTooLarge), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/RequestBodyTest.kt

      ) {
        filePath = tempDir.toOkioPath() / "file.txt"
      }
    
      @Test
      fun testFileDescriptor() {
        assertOnFileDescriptor { fd ->
          val requestBody = fd.toRequestBody()
    
          assertThat(requestBody.contentLength()).isEqualTo(-1L)
          assertThat(requestBody.isOneShot()).isEqualTo(true)
        }
      }
    
      @Test
      fun testFileDescriptorRead() {
        assertOnFileDescriptor(content = "Hello") { fd ->
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (1)
Back to top