Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 58 for body (0.15 sec)

  1. cmd/storage-rest-client.go

    	defer xioutil.SafeClose(resp)
    	body, err := req.MarshalMsg(nil)
    	if err != nil {
    		return err
    	}
    	respBody, err := client.call(ctx, storageRESTMethodReadMultiple, nil, bytes.NewReader(body), int64(len(body)))
    	if err != nil {
    		return err
    	}
    	defer xhttp.DrainBody(respBody)
    
    	pr, pw := io.Pipe()
    	go func() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  2. cmd/auth-handler.go

    	if action == policy.CreateBucketAction {
    		// To extract region from XML in request body, get copy of request body.
    		payload, err := io.ReadAll(io.LimitReader(r.Body, maxLocationConstraintSize))
    		if err != nil {
    			authZLogIf(ctx, err, logger.ErrorKind)
    			return ErrMalformedXML
    		}
    
    		// Populate payload to extract location constraint.
    		r.Body = io.NopCloser(bytes.NewReader(payload))
    		region, s3Err = parseLocationConstraint(r)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  3. cmd/post-policy_test.go

    		if perr != nil {
    			t.Fatalf("Test %d: %s: Failed to create HTTP request for PostPolicyHandler: <ERROR> %v", i+1, instanceType, perr)
    		}
    		if testCase.malformedBody {
    			// Change the request body.
    			req.Body = io.NopCloser(bytes.NewReader([]byte("Hello,")))
    		}
    		// Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
    		// Call the ServeHTTP to execute the handler.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  4. cmd/admin-handlers-config-kv.go

    		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)
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL)
    		return
    	}
    
    	subSys, _, _, err := config.GetSubSys(string(kvBytes))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  5. cmd/warm-backend-azure.go

    	if err != nil {
    		return nil, azureToObjectError(err, az.Bucket, object)
    	}
    
    	rc := blob.Body(azblob.RetryReaderOptions{})
    	return rc, nil
    }
    
    func (az *warmBackendAzure) Remove(ctx context.Context, object string, rv remoteVersionID) error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 05 16:44:08 GMT 2024
    - 7.8K bytes
    - Viewed (1)
  6. cmd/peer-rest-server.go

    		return
    	}
    
    	var rulesMap event.RulesMap
    	if r.ContentLength < 0 {
    		s.writeErrorResponse(w, errInvalidArgument)
    		return
    	}
    
    	err := gob.NewDecoder(r.Body).Decode(&rulesMap)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    
    	globalEventNotifier.AddRulesMap(bucketName, rulesMap)
    }
    
    // HealthHandler - returns true of health
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  7. cmd/admin-bucket-handlers.go

    	if _, err := objectAPI.GetBucketInfo(ctx, bucket, BucketOptions{}); err != nil {
    		writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	data, err := io.ReadAll(r.Body)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL)
    		return
    	}
    
    	quotaConfig, err := parseBucketQuota(bucket, data)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  8. cmd/handler-utils.go

    func parseLocationConstraint(r *http.Request) (location string, s3Error APIErrorCode) {
    	// If the request has no body with content-length set to 0,
    	// 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 {
    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/bucket-encryption-handlers.go

    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Parse bucket encryption xml
    	encConfig, err := validateBucketSSEConfig(io.LimitReader(r.Body, maxBucketSSEConfigSize))
    	if err != nil {
    		apiErr := APIError{
    			Code:           "MalformedXML",
    			Description:    fmt.Sprintf("%s (%s)", errorCodes[ErrMalformedXML].Description, err),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  10. cmd/update.go

    		}
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	if resp.StatusCode != http.StatusOK {
    		return content, AdminError{
    			Code:       AdminUpdateUnexpectedFailure,
    			Message:    fmt.Sprintf("Error downloading URL %s. Response: %v", u, resp.Status),
    			StatusCode: resp.StatusCode,
    		}
    	}
    
    	contentBytes, err := io.ReadAll(resp.Body)
    	if err != nil {
    		return content, AdminError{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 18.7K bytes
    - Viewed (0)
Back to top