Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 104 for ETag (0.23 sec)

  1. internal/etag/etag.go

    //	   if err != nil {
    //	   }
    //	}
    //	ETag = ETag.Format()
    func (e ETag) Format() ETag {
    	if !e.IsEncrypted() {
    		return e
    	}
    	return e[len(e)-16:]
    }
    
    var _ Tagger = ETag{} // compiler check
    
    // ETag returns the ETag itself.
    //
    // By providing this method ETag implements
    // the Tagger interface.
    func (e ETag) ETag() ETag { return e }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  2. 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
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  3. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  4. cmd/object-handlers-common.go

    	// 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.
    	if objInfo.ETag != "" && !delete {
    		w.Header()[xhttp.ETag] = []string{`"` + objInfo.ETag + `"`}
    	}
    
    	// Set the relevant version ID as part of the response header.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 09 08:17:49 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  5. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  6. 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 21 19:28:08 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  7. 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 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Sep 24 04:17:08 GMT 2022
    - 19.9K bytes
    - Viewed (0)
  8. internal/hash/reader.go

    func (r *Reader) ActualSize() int64 { return r.actualSize }
    
    // ETag returns the ETag computed by an underlying etag.Tagger.
    // If the underlying io.Reader does not implement etag.Tagger
    // it returns nil.
    func (r *Reader) ETag() etag.ETag {
    	if t, ok := r.src.(etag.Tagger); ok {
    		return t.ETag()
    	}
    	return nil
    }
    
    // MD5Current returns the MD5 checksum of the content
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.8K bytes
    - Viewed (0)
  9. 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,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 42.4K bytes
    - Viewed (0)
  10. internal/config/cache/remote.go

    	preamble()
    
    	if !oi.ModTime.IsZero() {
    		w.Header().Set(xhttp.LastModified, oi.ModTime.UTC().Format(http.TimeFormat))
    	}
    
    	if oi.ETag != "" {
    		w.Header()[xhttp.ETag] = []string{"\"" + oi.ETag + "\""}
    	}
    
    	if oi.Expires != "" {
    		w.Header().Set(xhttp.Expires, oi.Expires)
    	}
    
    	if oi.CacheControl != "" {
    		w.Header().Set(xhttp.CacheControl, oi.CacheControl)
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Nov 22 21:46:17 GMT 2023
    - 3.7K bytes
    - Viewed (0)
Back to top