diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 40dbf807a..87de743b8 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -5422,7 +5422,7 @@ func (f *Fs) headObject(ctx context.Context, req *s3.HeadObjectInput) (resp *s3. }) if err != nil { if awsErr, ok := err.(awserr.RequestFailure); ok { - if awsErr.StatusCode() == http.StatusNotFound { + if awsErr.StatusCode() == http.StatusNotFound || awsErr.StatusCode() == http.StatusMethodNotAllowed { return nil, fs.ErrorObjectNotFound } }