diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-08-01 00:13:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-01 00:13:00 -0700 |
| commit | 90ddd7ec928d1a74c34f26779ea684b9d85658fb (patch) | |
| tree | ed398ec2e75440f48459634a1a244a9cebd167e0 /weed/s3api/s3api_object_handlers.go | |
| parent | a6b59d50f7f36a36f42ace7a9fa94b60805b78be (diff) | |
| parent | b41b7ea4d09616b42edbad87ab71ac4f2b0fa08c (diff) | |
| download | seaweedfs-90ddd7ec928d1a74c34f26779ea684b9d85658fb.tar.xz seaweedfs-90ddd7ec928d1a74c34f26779ea684b9d85658fb.zip | |
Merge pull request #1408 from hilimd/master
fix spark read s3 bug (sc.binaryFiles)
Diffstat (limited to 'weed/s3api/s3api_object_handlers.go')
| -rw-r--r-- | weed/s3api/s3api_object_handlers.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index 9773add81..357ac9ce0 100644 --- a/weed/s3api/s3api_object_handlers.go +++ b/weed/s3api/s3api_object_handlers.go @@ -230,6 +230,11 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des resp, postErr := client.Do(proxyReq) + if resp.ContentLength == -1 { + writeErrorResponse(w, ErrNoSuchKey, r.URL) + return + } + if postErr != nil { glog.Errorf("post to filer: %v", postErr) writeErrorResponse(w, ErrInternalError, r.URL) |
