Files
rclone/backend
lewoberst c1df24f142 * s3: fix error mapping in GetObject to match HeadObject
The HeadObject path translates a 404 (Not Found) and a 405 (Method Not
Allowed) response into fs.ErrorObjectNotFound, but the GetObject path
returns the raw AWS SDK error instead. With --s3-no-head-object set,
Object.Open() is the first request to hit the source for a GET
operation, so callers that rely on fs.ErrorObjectNotFound see an
opaque "operation error S3: GetObject, ... StatusCode: 404" string
when --s3-no-head-object is set.

Mirror the error handling of HeadObject. The 405 (Method Not Allowed)
case applies to GetObject for the same reason it applies to
HeadObject: A request that specifies the versionId of a delete marker
returns 405 instead of 404 (commit 8470bdf810, AWS S3 delete-marker
docs).

Co-authored-by: Jan Schlien <rclone-github@jan-o-sch.net>
2026-06-26 18:37:02 +01:00
..
2026-05-01 13:41:07 +01:00
2025-06-12 18:31:01 +01:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2024-08-12 13:35:44 +01:00
2025-02-28 11:31:14 +00:00
2026-05-30 11:01:20 +01:00
2025-02-28 11:31:14 +00:00
2025-11-13 13:47:40 +00:00