Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 208 for newReader (0.11 sec)

  1. cmd/signature-v4-utils.go

    		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
    		v                  []string
    		ok                 bool
    	)
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  2. cmd/encryption-v1_test.go

    		},
    	},
    }
    
    func TestEncryptRequest(t *testing.T) {
    	defer func(flag bool) { globalIsTLS = flag }(globalIsTLS)
    	globalIsTLS = true
    	for i, test := range encryptRequestTests {
    		content := bytes.NewReader(make([]byte, 64))
    		req := &http.Request{Header: http.Header{}}
    		for k, v := range test.header {
    			req.Header.Set(k, v)
    		}
    		_, _, err := EncryptRequest(content, req, "bucket", "object", test.metadata)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Sep 24 04:17:08 UTC 2022
    - 19.9K bytes
    - Viewed (0)
  3. docs/debugging/xl-meta/main.go

    			}
    			filemap[file] = make(map[string]string)
    			buf := bytes.NewBuffer(nil)
    			v0 := ""
    			var data xlMetaInlineData
    			switch minor {
    			case 0:
    				_, err = msgp.CopyToJSON(buf, bytes.NewReader(b))
    				if err != nil {
    					return nil, err
    				}
    			case 1, 2:
    				v, b, err := msgp.ReadBytesZC(b)
    				if err != nil {
    					return nil, err
    				}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 05 11:57:44 UTC 2024
    - 40.3K bytes
    - Viewed (0)
  4. src/archive/tar/tar_test.go

    	}
    	if _, err := tw.Write(data); err != nil {
    		t.Fatalf("tw.Write: %v", err)
    	}
    	if err := tw.Close(); err != nil {
    		t.Fatalf("tw.Close: %v", err)
    	}
    
    	// Read it back.
    	tr := NewReader(&b)
    	rHdr, err := tr.Next()
    	if err != nil {
    		t.Fatalf("tr.Next: %v", err)
    	}
    	if !reflect.DeepEqual(rHdr, hdr) {
    		t.Errorf("Header mismatch.\n got %+v\nwant %+v", rHdr, hdr)
    	}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Jul 25 00:25:45 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  5. cmd/bucket-handlers.go

    	}
    	if d != "multipart/form-data" {
    		return nil, http.ErrNotMultipart
    	}
    	boundary, ok := params["boundary"]
    	if !ok {
    		return nil, http.ErrMissingBoundary
    	}
    	return multipart.NewReader(r.Body, boundary), nil
    }
    
    // PostPolicyBucketHandler - POST policy
    // ----------
    // This implementation of the POST operation handles object creation with a specified
    // signature policy in multipart/form-data
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 63.4K bytes
    - Viewed (0)
  6. cmd/sftp-server-driver.go

    		}
    
    		dirPath := buildMinioDir(prefix)
    
    		_, err = clnt.PutObject(context.Background(), bucket, dirPath, bytes.NewReader([]byte("")), 0,
    			minio.PutObjectOptions{DisableContentSha256: true},
    		)
    		return err
    	}
    
    	return NotImplemented{}
    }
    
    type listerAt []os.FileInfo
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. cmd/metacache-stream.go

    				return err
    			}
    			return s2w.Close()
    		}
    		return nil
    	}
    }
    
    var s2DecPool = sync.Pool{New: func() interface{} {
    	// Default alloc block for network transfer.
    	return s2.NewReader(nil, s2.ReaderAllocBlock(16<<10))
    }}
    
    // metacacheReader allows reading a cache stream.
    type metacacheReader struct {
    	mr      *msgp.Reader
    	current metaCacheEntry
    	err     error // stateful error
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  8. internal/config/identity/plugin/config.go

    	RolePolicy string
    	RoleARN    arn.ARN
    }
    
    // Validate - validate configuration params.
    func (a *Args) Validate() error {
    	req, err := http.NewRequest(http.MethodPost, a.URL.String(), bytes.NewReader([]byte("")))
    	if err != nil {
    		return err
    	}
    
    	req.Header.Set("Content-Type", "application/json")
    	if a.AuthToken != "" {
    		req.Header.Set("Authorization", a.AuthToken)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. internal/bucket/object/lock/lock.go

    	buf, err := io.ReadAll(io.LimitReader(reader, maxObjectLockConfigSize))
    	if err != nil {
    		return nil, err
    	}
    
    	hold = &ObjectLegalHold{}
    	if err = xml.NewDecoder(bytes.NewReader(buf)).Decode(hold); err != nil {
    		return nil, err
    	}
    
    	if !hold.Status.Valid() {
    		return nil, ErrMalformedXML
    	}
    	return
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. cmd/iam.go

    	if ptok && spok && pt == embeddedPolicyType {
    		policyBytes, err := base64.StdEncoding.DecodeString(sp)
    		if err != nil {
    			return UserIdentity{}, nil, err
    		}
    		embeddedPolicy, err = policy.ParseConfig(bytes.NewReader(policyBytes))
    		if err != nil {
    			return UserIdentity{}, nil, err
    		}
    	}
    
    	return sa, embeddedPolicy, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 29 16:01:48 UTC 2024
    - 74.6K bytes
    - Viewed (0)
Back to top