From 402aef8f301403f46b702fbbb63d179caa2b72f3 Mon Sep 17 00:00:00 2001 From: limd Date: Fri, 25 Sep 2020 14:37:02 +0800 Subject: [PATCH] s3: 1.fix spark reading S3 directory wildcard problem 2.fix the problem of the spark history service writing S3 directory reference git revsion number: b41b7ea4d09616b42edbad87ab71ac4f2b0fa08c --- weed/s3api/s3api_object_handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index 13fae72a3..93d6db79f 100644 --- a/weed/s3api/s3api_object_handlers.go +++ b/weed/s3api/s3api_object_handlers.go @@ -265,7 +265,7 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des resp, postErr := client.Do(proxyReq) - if resp.ContentLength == -1 { + if resp.ContentLength == -1 && !strings.HasSuffix(destUrl, "/") { writeErrorResponse(w, s3err.ErrNoSuchKey, r.URL) return }