Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for containsReservedMetadata (0.34 sec)

  1. cmd/generic-handlers.go

    const (
    	ReservedMetadataPrefix      = "X-Minio-Internal-"
    	ReservedMetadataPrefixLower = "x-minio-internal-"
    )
    
    // containsReservedMetadata returns true if the http.Header contains
    // keys which are treated as metadata but are reserved for internal use
    // and must not set by clients
    func containsReservedMetadata(header http.Header) bool {
    	for key := range header {
    		if slices.Contains(maps.Keys(validSSEReplicationHeaders), key) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  2. cmd/generic-handlers_test.go

    		shouldFail: true,
    	},
    }
    
    func TestContainsReservedMetadata(t *testing.T) {
    	for _, test := range containsReservedMetadataTests {
    		test := test
    		t.Run("", func(t *testing.T) {
    			contains := containsReservedMetadata(test.header)
    			if contains && !test.shouldFail {
    				t.Errorf("contains reserved header but should not fail")
    			} else if !contains && test.shouldFail {
    				t.Errorf("does not contain reserved header but failed")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top