Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 480 for etags (0.19 sec)

  1. internal/etag/etag.go

    func Multipart(etags ...ETag) ETag {
    	if len(etags) == 0 {
    		return nil
    	}
    
    	var n int64
    	h := md5.New()
    	for _, etag := range etags {
    		if !etag.IsMultipart() && !etag.IsEncrypted() {
    			h.Write(etag)
    			n++
    		}
    	}
    	etag := append(h.Sum(nil), '-')
    	return strconv.AppendInt(etag, n, 10)
    }
    
    // Set adds the ETag to the HTTP headers. It overwrites any
    // existing ETag entry.
    //
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  2. internal/etag/etag_test.go

    		ETags:     []ETag{},
    		Multipart: ETag{},
    	},
    	{
    		ETags:     []ETag{must("b10a8db164e0754105b7a99be72e3fe5")},
    		Multipart: must("7b976cc68452e003eec7cb0eb631a19a-1"),
    	},
    	{
    		ETags:     []ETag{must("5f363e0e58a95f06cbe9bbc662c5dfb6"), must("5f363e0e58a95f06cbe9bbc662c5dfb6")},
    		Multipart: must("a7d414b9133d6483d9a1c4e04e856e3b-2"),
    	},
    	{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  3. cmd/erasure-healing-common.go

    	"bytes"
    	"context"
    	"time"
    
    	"github.com/minio/madmin-go/v3"
    )
    
    func commonETags(etags []string) (etag string, maxima int) {
    	etagOccurrenceMap := make(map[string]int, len(etags))
    
    	// Ignore the uuid sentinel and count the rest.
    	for _, etag := range etags {
    		if etag == "" {
    			continue
    		}
    		etagOccurrenceMap[etag]++
    	}
    
    	maxima = 0 // Counter for remembering max occurrence of elements.
    	latest := ""
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. internal/crypto/key.go

    	return partKey
    }
    
    // SealETag seals the etag using the object key.
    // It does not encrypt empty ETags because such ETags indicate
    // that the S3 client hasn't sent an ETag = MD5(object) and
    // the backend can pick an ETag value.
    func (key ObjectKey) SealETag(etag []byte) []byte {
    	if len(etag) == 0 { // don't encrypt empty ETag - only if client sent ETag = MD5(object)
    		return etag
    	}
    	var buffer bytes.Buffer
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  5. cmd/encryption-v1.go

    		}
    		if _, err := strconv.ParseInt(object.ETag[i+1:], 10, 32); err != nil {
    			return "", errObjectTampered
    		}
    		return object.ETag, nil
    	}
    
    	etag, err := hex.DecodeString(object.ETag)
    	if err != nil {
    		return "", err
    	}
    	etag, err = key.UnsealETag(etag)
    	if err != nil {
    		return "", err
    	}
    	return hex.EncodeToString(etag), nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 36.5K bytes
    - Viewed (0)
  6. internal/etag/reader.go

    	sum := r.md5.Sum(nil)
    	return ETag(sum)
    }
    
    // VerifyError is an error signaling that a
    // computed ETag does not match an expected
    // ETag.
    type VerifyError struct {
    	Expected ETag
    	Computed ETag
    }
    
    func (v VerifyError) Error() string {
    	return fmt.Sprintf("etag: expected ETag %q does not match computed ETag %q", v.Expected, v.Computed)
    }
    
    // UUIDHash - use uuid to make md5sum
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  7. cmd/erasure-multipart.go

    	// However, in case of encryption, the persisted part ETags don't match
    	// what we have sent to the client during PutObjectPart. The reason is
    	// that ETags are encrypted. Hence, the client will send a list of complete
    	// part ETags of which non can match the ETag of any part. For example
    	//   ETag (client):          30902184f4e62dd8f98f0aaff810c626
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 43K bytes
    - Viewed (0)
  8. cmd/object-multipart-handlers.go

    			if len(etag) >= 32 && strings.Count(etag, "-") != 1 {
    				etag = etag[len(etag)-32:]
    			}
    		}
    	}
    
    	// We must not use the http.Header().Set method here because some (broken)
    	// clients expect the ETag header key to be literally "ETag" - not "Etag" (case-sensitive).
    	// Therefore, we have to set the ETag directly as map entry.
    	w.Header()[xhttp.ETag] = []string{"\"" + etag + "\""}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  9. cmd/encryption-v1_test.go

    		ETag:       "",
    		ShouldFail: true, // ETag is not a valid hex value
    	},
    	{
    		ObjectKey:  [32]byte{},
    		ObjectInfo: ObjectInfo{ETag: "00000f00f27834c9a2654927546df57f9e998187496394d4ee80f3d9978f85f3c7d81f72600cdbe03d80dc5a13d69354"},
    		ETag:       "",
    		ShouldFail: true, // modified ETag
    	},
    
    	// Special tests for ETags that end with a '-x'
    	{
    		ObjectKey:  [32]byte{},
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Sep 24 04:17:08 GMT 2022
    - 19.9K bytes
    - Viewed (0)
  10. cmd/xl-storage-format-v2.go

    			MetaSys:            make(map[string][]byte),
    			MetaUser:           make(map[string]string, len(fi.Metadata)),
    		}
    		for i := range fi.Parts {
    			// Only add etags if any.
    			if fi.Parts[i].ETag != "" {
    				ventry.ObjectV2.PartETags = make([]string, len(fi.Parts))
    				break
    			}
    		}
    		for i := range fi.Parts {
    			// Only add indices if any.
    			if len(fi.Parts[i].Index) > 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 05:07:37 GMT 2024
    - 63.6K bytes
    - Viewed (1)
Back to top