Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: fix 405 error on HEAD for delete marker with versionId

nielash8470bdf8104e
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
}
}