Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for stringsHasPrefixFold (0.29 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. cmd/api-response.go

    		}
    	case crypto.SSEC:
    		m[xhttp.AmzServerSideEncryptionCustomerAlgorithm] = xhttp.AmzEncryptionAES
    
    	}
    
    	var toRemove []string
    	for k := range cleanMinioInternalMetadataKeys(m) {
    		if stringsHasPrefixFold(k, ReservedMetadataPrefixLower) {
    			// Do not need to send any internal metadata
    			// values to client.
    			toRemove = append(toRemove, k)
    			continue
    		}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 19:27:06 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  8. cmd/bucket-lifecycle.go

    	if sc == "" {
    		sc = objInfo.StorageClass
    	}
    	meta[strings.ToLower(xhttp.AmzStorageClass)] = sc
    
    	if rreq.Type == SelectRestoreRequest {
    		for _, v := range rreq.OutputLocation.S3.UserMetadata {
    			if !stringsHasPrefixFold(v.Name, "x-amz-meta") {
    				meta["x-amz-meta-"+v.Name] = v.Value
    				continue
    			}
    			meta[v.Name] = v.Value
    		}
    		if tags := rreq.OutputLocation.S3.Tagging.String(); tags != "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 23 15:35:37 UTC 2024
    - 33.7K bytes
    - Viewed (0)
  9. cmd/object-api-utils.go

    // For example on windows since its case insensitive we are supposed
    // to do case insensitive checks.
    func HasPrefix(s string, prefix string) bool {
    	if runtime.GOOS == globalWindowsOSName {
    		return stringsHasPrefixFold(s, prefix)
    	}
    	return strings.HasPrefix(s, prefix)
    }
    
    // HasSuffix - Suffix matcher string matches suffix in a platform specific way.
    // For example on windows since its case insensitive we are supposed
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
Back to top