aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_object_handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/s3api/s3api_object_handlers.go')
-rw-r--r--weed/s3api/s3api_object_handlers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index a9be99d2f..f0d13af05 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -8,6 +8,7 @@ import (
"io"
"io/ioutil"
"net/http"
+ "strings"
)
var (
@@ -92,6 +93,11 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)
func (s3a *S3ApiServer) GetObjectHandler(w http.ResponseWriter, r *http.Request) {
+ if strings.HasSuffix(r.URL.Path, "/") {
+ writeErrorResponse(w, ErrNotImplemented, r.URL)
+ return
+ }
+
destUrl := fmt.Sprintf("http://%s%s%s",
s3a.option.Filer, s3a.option.BucketsPath, r.RequestURI)