Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 128 for setTag (0.39 seconds)

  1. internal/etag/etag_test.go

    var stringTests = []struct {
    	ETag   ETag
    	String string
    }{
    	{ETag: ETag{59, 131, 239, 150, 56, 127, 20, 101}, String: "3b83ef96387f1465"},                                                                  // 0
    	{ETag: ETag{59, 131, 239, 150, 56, 127, 20, 101, 95, 200, 84, 221, 195, 198, 189, 87}, String: "3b83ef96387f14655fc854ddc3c6bd57"},             // 1
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Wed Apr 09 14:28:39 GMT 2025
    - 12.6K bytes
    - Click Count (0)
  2. cmd/api-response.go

    // generates CopyObjectResponse from etag and lastModified time.
    func generateCopyObjectResponse(etag string, lastModified time.Time) CopyObjectResponse {
    	return CopyObjectResponse{
    		ETag:         "\"" + etag + "\"",
    		LastModified: amztime.ISO8601Format(lastModified.UTC()),
    	}
    }
    
    // generates CopyObjectPartResponse from etag and lastModified time.
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Oct 24 04:05:19 GMT 2025
    - 35K bytes
    - Click Count (0)
  3. cmd/erasure-multipart-conditional_test.go

    		// This should fail even without quorum issues, but with quorum failure
    		// we can't verify the ETag at all.
    		opts := ObjectOptions{
    			UserDefined: map[string]string{
    				xhttp.IfMatch: "wrong-etag-12345",
    			},
    			HasIfMatch: true,
    			CheckPrecondFn: func(oi ObjectInfo) bool {
    				// Precondition fails if ETags don't match
    				return oi.ETag != "wrong-etag-12345"
    			},
    		}
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Oct 24 04:05:31 GMT 2025
    - 6.9K bytes
    - Click Count (0)
  4. cmd/encryption-v1_test.go

    		ETag:       "",
    		ShouldFail: true, // ETag prefix is not a valid hex value
    	},
    	{
    		ObjectKey:  [32]byte{},
    		ObjectInfo: ObjectInfo{ETag: "16516b396f0f4d4f2a0e7177557bec4-1-2"},
    		ETag:       "",
    		ShouldFail: true, // ETag contains multiple: -
    	},
    }
    
    func TestDecryptETag(t *testing.T) {
    	for i, test := range decryptETagTests {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 19.9K bytes
    - Click Count (0)
  5. cmd/erasure-multipart.go

    				PartNumber: part.PartNumber,
    				GotETag:    part.ETag,
    			}
    			return oi, invp
    		}
    		expPart := currentFI.Parts[partIdx]
    
    		// ensure that part ETag is canonicalized to strip off extraneous quotes
    		part.ETag = canonicalizeETag(part.ETag)
    		expETag := tryDecryptETag(objectEncryptionKey, expPart.ETag, kind == crypto.S3)
    		if expETag != part.ETag {
    			invp := InvalidPart{
    				PartNumber: part.PartNumber,
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Oct 24 04:05:31 GMT 2025
    - 47.1K bytes
    - Click Count (0)
  6. cmd/erasure-healing-common.go

    		etag = commonETag(etags, quorum)
    
    		if etag != "" { // allow this fallback only if a non-empty etag is found.
    			for index, e := range etags {
    				if partsMetadata[index].IsValid() && e == etag {
    					onlineDisks[index] = disks[index]
    				} else {
    					onlineDisks[index] = nil
    				}
    			}
    			return onlineDisks, modTime, etag
    		}
    	}
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 12K bytes
    - Click Count (0)
  7. cmd/bucket-handlers.go

    		return
    	}
    
    	etag := getDecryptedETag(formValues, objInfo, false)
    
    	// 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 + `"`}
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 63.9K bytes
    - Click Count (0)
  8. cmd/erasure-object-conditional_test.go

    		// Test Case 3: if-match with wrong ETag
    		// Even if the ETag doesn't match, we should still get read quorum error
    		// because we can't read the object to check the condition.
    		opts := ObjectOptions{
    			UserDefined: map[string]string{
    				xhttp.IfMatch: "wrong-etag",
    			},
    			CheckPrecondFn: func(oi ObjectInfo) bool {
    				// Precondition fails if ETag doesn't match
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Oct 24 04:05:31 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  9. 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
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri May 16 14:27:42 GMT 2025
    - 6.2K bytes
    - Click Count (0)
  10. internal/crypto/key_test.go

    	for i := range key {
    		key[i] = byte(i)
    	}
    	for i, etag := range sealUnsealETagTests {
    		tag, err := hex.DecodeString(etag)
    		if err != nil {
    			t.Errorf("Test %d: failed to decode etag: %s", i, err)
    		}
    		sealedETag := key.SealETag(tag)
    		unsealedETag, err := key.UnsealETag(sealedETag)
    		if err != nil {
    			t.Errorf("Test %d: failed to decrypt etag: %s", i, err)
    		}
    		if !bytes.Equal(unsealedETag, tag) {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Jul 12 20:51:54 GMT 2024
    - 6.7K bytes
    - Click Count (0)
Back to Top