From e571d6d00b4ebde80c6e2f3be53bb3886346d232 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Mon, 29 Mar 2021 19:29:57 -0700 Subject: [PATCH] Narrow Down s3 detector for 5 parts virtual hosted style test --- detect_s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect_s3.go b/detect_s3.go index 9eaa5ff2f..89f3c35dc 100644 --- a/detect_s3.go +++ b/detect_s3.go @@ -34,7 +34,7 @@ func (d *S3Detector) detectHTTP(src string) (string, bool, error) { return d.detectPathStyle(hostParts[0], parts[1:]) } else if len(hostParts) == 4 { return d.detectVhostStyle(hostParts[1], hostParts[0], parts[1:]) - } else if len(hostParts) == 5 { + } else if len(hostParts) == 5 && hostParts[1] == "s3" { return d.detectNewVhostStyle(hostParts[2], hostParts[0], parts[1:]) } else { return "", false, fmt.Errorf(