fix: reject unknown response-* query parameters in GetObject and HeadObject
getobject and headobject silently ignored any response-* query parameter outside the six overridable headers. they now return 400 InvalidArgument naming the parameter and its value, like s3, and the rest tests skipped for this issue are enabled. Fixes #2075
This commit is contained in:
1 parent
5a14104c85
commit
86ff18f8c1
13 files changed
+208
-6
No files matched your search
@@ -401,3 +401,13 @@ func GetInvalidArgBucketRegion(value string) InvalidArgumentError {
|
||||
Description: description,
|
||||
}
|
||||
}
|
||||
|
||||
// GetInvalidArgResponseOverride is returned for a response-* query parameter
|
||||
// that isn't one of the response headers GetObject and HeadObject can override.
|
||||
func GetInvalidArgResponseOverride(name, value string) InvalidArgumentError {
|
||||
return InvalidArgumentError{
|
||||
ArgumentName: name,
|
||||
ArgumentValue: value,
|
||||
Description: fmt.Sprintf("%s is not in the set of overridable response headers. Please refer to the S3 API documentation for a complete list of overridable response headers.", name),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user