Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 82 for BODY (0.19 sec)

  1. cmd/server_test.go

    	c.Assert(err, nil)
    	// assert the http response status code.
    	c.Assert(response.StatusCode, http.StatusOK)
    
    	var buffer bytes.Buffer
    	// extract the body of the response.
    	responseBody, err := io.ReadAll(response.Body)
    	c.Assert(err, nil)
    	// assert the http response body content.
    	c.Assert(true, bytes.Equal(responseBody, buffer.Bytes()))
    }
    
    func (s *TestSuiteCommon) TestBucket(c *check) {
    	// generate a random bucket name.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 108K bytes
    - Viewed (0)
  2. internal/grid/trace.go

    				Time:    start,
    				Proto:   "grid",
    				Method:  "REQ",
    				Client:  local,
    				Headers: nil,
    				Path:    t.Subroute,
    				Body:    []byte(body),
    			},
    			RespInfo: madmin.TraceResponseInfo{
    				Time:       end,
    				Headers:    nil,
    				StatusCode: status,
    				Body:       []byte(bytesOrLength(resp)),
    			},
    			CallStats: madmin.TraceCallStats{
    				InputBytes:      len(req),
    				OutputBytes:     len(resp),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 02 22:54:54 GMT 2024
    - 4K bytes
    - Viewed (0)
  3. internal/config/identity/openid/jwt.go

    		Transport: r.transport,
    	}
    
    	resp, err := client.Get(pCfg.JWKS.URL.String())
    	if err != nil {
    		return err
    	}
    	defer r.closeRespFn(resp.Body)
    	if resp.StatusCode != http.StatusOK {
    		return errors.New(resp.Status)
    	}
    
    	return r.pubKeys.parseAndAdd(resp.Body)
    }
    
    // ErrTokenExpired - error token expired
    var (
    	ErrTokenExpired = errors.New("token expired")
    )
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Nov 16 04:42:31 GMT 2023
    - 8.3K bytes
    - Viewed (5)
  4. 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)
  5. cmd/signature-v4-utils.go

    func getContentSha256Cksum(r *http.Request, stype serviceType) string {
    	if stype == serviceSTS {
    		payload, err := io.ReadAll(io.LimitReader(r.Body, stsRequestBodyLimit))
    		if err != nil {
    			logger.CriticalIf(GlobalContext, err)
    		}
    		sum256 := sha256.Sum256(payload)
    		r.Body = io.NopCloser(bytes.NewReader(payload))
    		return hex.EncodeToString(sum256[:])
    	}
    
    	var (
    		defaultSha256Cksum string
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 18:56:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  6. cmd/tier-handlers.go

    	ctx := r.Context()
    
    	objAPI, cred := validateAdminReq(ctx, w, r, policy.SetTierAction)
    	if objAPI == nil {
    		return
    	}
    
    	password := cred.SecretKey
    	reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    
    	var cfg madmin.TierConfig
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 15 19:52:44 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. cmd/acl-handlers.go

    	if err != nil {
    		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)
  8. 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)
  9. cmd/bucket-policy-handlers.go

    	if r.ContentLength > maxBucketPolicySize {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrPolicyTooLarge), r.URL)
    		return
    	}
    
    	bucketPolicyBytes, err := io.ReadAll(io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	bucketPolicy, err := policy.ParseBucketPolicyConfig(bytes.NewReader(bucketPolicyBytes), bucket)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  10. cmd/api-errors.go

    		Code:           "InvalidStorageClass",
    		Description:    "Invalid storage class.",
    		HTTPStatusCode: http.StatusBadRequest,
    	},
    	ErrInvalidRequestBody: {
    		Code:           "InvalidArgument",
    		Description:    "Body shouldn't be set for this request.",
    		HTTPStatusCode: http.StatusBadRequest,
    	},
    	ErrInvalidMaxUploads: {
    		Code:           "InvalidArgument",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 91.4K bytes
    - Viewed (6)
Back to top