Files
seaweedFS/weed/s3api
Chris Lu ebb4f57cc7 s3api: Fix response-content-disposition query parameter not being honored (#7559)
* s3api: Fix response-content-disposition query parameter not being honored

Fixes #7486

This fix resolves an issue where S3 presigned URLs with query parameters
like `response-content-disposition`, `response-content-type`, etc. were
being ignored, causing browsers to use default file handling instead of
the specified behavior.

Changes:
- Modified `setResponseHeaders()` to accept the HTTP request object
- Added logic to process S3 passthrough headers from query parameters
- Updated all call sites to pass the request object
- Supports all AWS S3 response override parameters:
  - response-content-disposition
  - response-content-type
  - response-cache-control
  - response-content-encoding
  - response-content-language
  - response-expires

The implementation follows the same pattern used in the filer handler
and properly honors the AWS S3 API specification for presigned URLs.

Testing:
- Existing S3 API tests pass without modification
- Build succeeds with no compilation errors

* Update weed/s3api/s3api_object_handlers.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-11-26 17:17:02 -08:00
..
fix
2024-10-03 09:03:17 -07:00
2025-02-01 14:11:57 -08:00
2024-07-04 11:00:41 -07:00
2025-07-19 00:49:56 -07:00
2024-07-04 11:00:41 -07:00
2025-08-22 01:15:42 -07:00
2025-08-21 08:28:07 -07:00
2025-08-21 08:28:07 -07:00
2025-08-22 01:15:42 -07:00
2025-10-27 23:04:55 -07:00
2025-10-27 23:04:55 -07:00
2025-10-13 18:05:17 -07:00
2025-07-22 01:07:15 -07:00
2025-11-21 14:48:41 -08:00
2024-04-29 05:33:56 -07:00
2025-07-28 02:49:43 -07:00
2025-07-28 02:49:43 -07:00

see https://blog.aqwari.net/xml-schema-go/

1. go get aqwari.net/xml/cmd/xsdgen
2. Add EncodingType element for ListBucketResult in AmazonS3.xsd
3. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd
4. Remove empty Grantee struct in s3api_xsd_generated.go
5. Remove xmlns: sed s'/http:\/\/s3.amazonaws.com\/doc\/2006-03-01\/\ //' s3api_xsd_generated.go