Browse Source
Update weed/s3api/s3api_object_handlers.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
pull/7559/head
Chris Lu
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
weed/s3api/s3api_object_handlers.go
|
|
@ -1981,7 +1981,7 @@ func (s3a *S3ApiServer) setResponseHeaders(w http.ResponseWriter, r *http.Reques |
|
|
// This allows presigned URLs to control how browsers handle the downloaded content
|
|
|
// This allows presigned URLs to control how browsers handle the downloaded content
|
|
|
if r != nil { |
|
|
if r != nil { |
|
|
for queryParam, headerValue := range r.URL.Query() { |
|
|
for queryParam, headerValue := range r.URL.Query() { |
|
|
if normalizedHeader, ok := s3_constants.PassThroughHeaders[strings.ToLower(queryParam)]; ok && len(headerValue) > 0 { |
|
|
|
|
|
|
|
|
if normalizedHeader, ok := s3_constants.PassThroughHeaders[strings.ToLower(queryParam)]; ok && len(headerValue) > 0 && headerValue[0] != "" { |
|
|
w.Header().Set(normalizedHeader, headerValue[0]) |
|
|
w.Header().Set(normalizedHeader, headerValue[0]) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|