SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
refactor: Performance and readability improvement on isDefaultPort (#6960)
Joon Young Baikc04b7b411c6e
diff --git a/weed/s3api/auth_signature_v4.go b/weed/s3api/auth_signature_v4.goindex c70027106a..0ddbaa9178 100644--- a/weed/s3api/auth_signature_v4.go+++ b/weed/s3api/auth_signature_v4.go@@ -763,9 +763,14 @@ func isDefaultPort(scheme, port string) bool {return true}- lowerCaseScheme := strings.ToLower(scheme)- return (lowerCaseScheme == "http" && port == "80") ||- (lowerCaseScheme == "https" && port == "443")+ switch port {+ case "80":+ return strings.EqualFold(scheme, "http")+ case "443":+ return strings.EqualFold(scheme, "https")+ default:+ return false+ }}// getSignedHeaders generate a string i.e alphabetically sorted, semicolon-separated list of lowercase request header names