Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for stringsHasPrefixFold (0.17 sec)

  1. cmd/api-headers.go

    		// Empty values for object lock and retention can be skipped.
    		if v == "" && equals(k, xhttp.AmzObjectLockMode, xhttp.AmzObjectLockRetainUntilDate) {
    			continue
    		}
    
    		if stringsHasPrefixFold(k, ReservedMetadataPrefixLower) {
    			// Do not need to send any internal metadata
    			// values to client.
    			continue
    		}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 28 04:44:00 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. cmd/event-notification.go

    		newEvent.S3.Object.ContentType = args.Object.ContentType
    		newEvent.S3.Object.UserMetadata = make(map[string]string, len(args.Object.UserDefined))
    		for k, v := range args.Object.UserDefined {
    			if stringsHasPrefixFold(strings.ToLower(k), ReservedMetadataPrefixLower) {
    				continue
    			}
    			newEvent.S3.Object.UserMetadata[k] = v
    		}
    	}
    
    	return newEvent
    }
    
    func sendEvent(args eventArgs) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 21 22:22:24 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. cmd/batch-rotate.go

    		return err
    	}
    	oi := obj.Clone()
    	var (
    		newKeyID      string
    		newKeyContext kms.Context
    	)
    	encMetadata := make(map[string]string)
    	for k, v := range oi.UserDefined {
    		if stringsHasPrefixFold(k, ReservedMetadataPrefixLower) {
    			encMetadata[k] = v
    		}
    	}
    
    	if (sseKMS || sseS3) && r.Encryption.Type == ssekms {
    		if err = r.Encryption.Validate(); err != nil {
    			return err
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  4. cmd/object-lambda-handlers.go

    		return code
    	}
    	return -1
    }
    
    func fwdHeadersToS3(h http.Header, w http.ResponseWriter) {
    	const trim = "x-amz-fwd-header-"
    	for k, v := range h {
    		if stringsHasPrefixFold(k, trim) {
    			w.Header()[k[len(trim):]] = v
    		}
    	}
    }
    
    func fwdStatusToAPIError(resp *http.Response) *APIError {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 22 07:04:48 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  5. cmd/generic-handlers.go

    // and must not set by clients
    func containsReservedMetadata(header http.Header) bool {
    	for key := range header {
    		if slices.Contains(maps.Keys(validSSEReplicationHeaders), key) {
    			return false
    		}
    		if stringsHasPrefixFold(key, ReservedMetadataPrefix) {
    			return true
    		}
    	}
    	return false
    }
    
    // isHTTPHeaderSizeTooLarge returns true if the provided
    // header is larger than 8 KB or the user-defined metadata
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  6. cmd/utils.go

    func unwrapAll(err error) error {
    	for {
    		werr := errors.Unwrap(err)
    		if werr == nil {
    			return err
    		}
    		err = werr
    	}
    }
    
    // stringsHasPrefixFold tests whether the string s begins with prefix ignoring case.
    func stringsHasPrefixFold(s, prefix string) bool {
    	// Test match with case first.
    	return len(s) >= len(prefix) && (s[0:len(prefix)] == prefix || strings.EqualFold(s[0:len(prefix)], prefix))
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:22:04 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  7. cmd/signature-v4-utils.go

    func checkMetaHeaders(signedHeadersMap http.Header, r *http.Request) APIErrorCode {
    	// check values from http header
    	for k, val := range r.Header {
    		if stringsHasPrefixFold(k, "X-Amz-Meta-") {
    			if signedHeadersMap.Get(k) == val[0] {
    				continue
    			}
    			return ErrUnsignedHeaders
    		}
    	}
    
    	return ErrNone
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. cmd/handler-utils.go

    				m[v] = strings.Join(value, ",")
    			} else {
    				m[supportedHeader] = strings.Join(value, ",")
    			}
    		}
    	}
    
    	for key := range v {
    		for _, prefix := range userMetadataKeyPrefixes {
    			if !stringsHasPrefixFold(key, prefix) {
    				continue
    			}
    			value, ok := nv[http.CanonicalHeaderKey(key)]
    			if ok {
    				m[key] = strings.Join(value, ",")
    				break
    			}
    		}
    	}
    	return nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  9. cmd/batch-handlers.go

    				}
    			}
    
    			// None of the provided tags filter match skip the object
    			return false
    		}
    
    		for _, kv := range r.Flags.Filter.Metadata {
    			for k, v := range oi.UserDefined {
    				if !stringsHasPrefixFold(k, "x-amz-meta-") && !isStandardHeader(k) {
    					continue
    				}
    				// We only need to match x-amz-meta or standardHeaders
    				if kv.Match(BatchJobKV{Key: k, Value: v}) {
    					return true
    				}
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 18 15:32:09 UTC 2024
    - 62.2K bytes
    - Viewed (0)
  10. cmd/batch-expire.go

    			// Object (version) must match all x-amz-meta and
    			// standard metadata headers
    			// specified in the filter
    			var match bool
    			for k, v := range obj.UserDefined {
    				if !stringsHasPrefixFold(k, "x-amz-meta-") && !isStandardHeader(k) {
    					continue
    				}
    				// We only need to match x-amz-meta or standardHeaders
    				if kv.Match(BatchJobKV{Key: k, Value: v}) {
    					match = true
    				}
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
Back to top