-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add s3 invalid expires protocol test #2094
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -43,7 +43,8 @@ service AmazonS3 { | |||||||||||
operations: [ | ||||||||||||
ListObjectsV2, | ||||||||||||
GetBucketLocation, | ||||||||||||
DeleteObjectTagging | ||||||||||||
DeleteObjectTagging, | ||||||||||||
GetObject | ||||||||||||
], | ||||||||||||
} | ||||||||||||
|
||||||||||||
|
@@ -364,7 +365,6 @@ operation GetBucketLocation { | |||||||||||
output: GetBucketLocationOutput, | ||||||||||||
} | ||||||||||||
|
||||||||||||
|
||||||||||||
structure CommonPrefix { | ||||||||||||
Prefix: Prefix, | ||||||||||||
} | ||||||||||||
|
@@ -380,6 +380,42 @@ structure GetBucketLocationOutput { | |||||||||||
LocationConstraint: BucketLocationConstraint, | ||||||||||||
} | ||||||||||||
|
||||||||||||
@httpResponseTests([{ | ||||||||||||
id: "GetObjectInvalidExpires", | ||||||||||||
documentation: """ | ||||||||||||
S3 clients should not fail the request with invalid expires. | ||||||||||||
GA SDKs should verify the value in ExpiresString param and | ||||||||||||
new SDKs should verifiy the value in Expires param | ||||||||||||
""", | ||||||||||||
code: 200, | ||||||||||||
headers: { | ||||||||||||
"Expires": "foobar1234" | ||||||||||||
}, | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just an idea, but we could add an
Suggested change
|
||||||||||||
body: "", | ||||||||||||
protocol: restXml | ||||||||||||
}]) | ||||||||||||
@http(uri: "/{Bucket}/{Key+}", method: "GET") | ||||||||||||
@s3UnwrappedXmlOutput | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the actual S3 model has |
||||||||||||
operation GetObject { | ||||||||||||
input: GetObjectRequest, | ||||||||||||
output: GetObjectOutput, | ||||||||||||
} | ||||||||||||
|
||||||||||||
structure GetObjectRequest { | ||||||||||||
@httpLabel | ||||||||||||
@required | ||||||||||||
Bucket: BucketName, | ||||||||||||
|
||||||||||||
@httpLabel | ||||||||||||
@required | ||||||||||||
Key: KeyName, | ||||||||||||
} | ||||||||||||
|
||||||||||||
structure GetObjectOutput { | ||||||||||||
@httpHeader("Expires") | ||||||||||||
Expires: Expires | ||||||||||||
} | ||||||||||||
|
||||||||||||
structure ListObjectsV2Request { | ||||||||||||
@httpLabel | ||||||||||||
@required | ||||||||||||
|
@@ -515,10 +551,14 @@ string AccountId | |||||||||||
|
||||||||||||
string BucketName | ||||||||||||
|
||||||||||||
string KeyName | ||||||||||||
|
||||||||||||
string Delimiter | ||||||||||||
|
||||||||||||
string DisplayName | ||||||||||||
|
||||||||||||
string Expires | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be a timestamp? From what I understand, clients should try deserializing as a timestamp, but not fail Expires is invalid, right? |
||||||||||||
|
||||||||||||
enum EncodingType { | ||||||||||||
@suppress(["EnumShape"]) | ||||||||||||
url | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reword suggestion, if accurate: