curvine icon indicating copy to clipboard operation
curvine copied to clipboard

[BUG]:S3 gateway returns 404 for object keys containing percent-encoded characters (e.g. Hive/Iceberg partition paths)

Open jerryzhujing opened this issue 3 weeks ago • 0 comments

Describe the bug The S3 gateway uses the raw request URI path as the object key without percent-decoding it. AWS SDKs encode = as %3D, so a GET/HEAD on bucket/tbl/data/dt=2026-11-01/f.parquet is looked up as /bucket/tbl/data/dt%3D2026-11-01/f.parquet and returns 404. Any Hive/Iceberg-style partitioned table is unreadable through the gateway.

To Reproduce

  1. cv mount s3://warehouse /warehouse --write-type cache_mode ...
  2. Start curvine-s3-gateway, add a credential.
  3. Point an S3 client (StarRocks Iceberg catalog / mc) at the gateway.
  4. mc stat gw/warehouse/db/tbl/data/dt=2026-11-01/xxx.parquet → "Object does not exist", while cv fs ls '/warehouse/db/tbl/data/dt=2026-11-01/' lists the file. StarRocks: BE access S3 file failed, SdkResponseCode=404. Master log: async load job ... File s3://warehouse/.../dt%3D2026-11-02/... not found.

Expected behavior Object keys are percent-decoded before mapping to Curvine paths, while signature verification keeps using the encoded path.

OS Version

  • macOS 15.5 (arm64), Curvine main @ ca88100; StarRocks 4.1.4 + Iceberg REST + MinIO

Additional context Listing works because prefix comes from the query string, which is already decoded.

jerryzhujing avatar Nov 09 '26 11:11 jerryzhujing