diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-11-26 17:17:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-26 17:17:02 -0800 |
| commit | ebb4f57cc73580deccfcce39cb8cd5af9682206c (patch) | |
| tree | c474acb116ac4d5c818975da5ee190e893df225d /test | |
| parent | 4106fc0436ce91591820a59a9715a06cacf06724 (diff) | |
| download | seaweedfs-ebb4f57cc73580deccfcce39cb8cd5af9682206c.tar.xz seaweedfs-ebb4f57cc73580deccfcce39cb8cd5af9682206c.zip | |
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>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions
