-
Notifications
You must be signed in to change notification settings - Fork 221
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 restXml protocol test for http label escaping #1759
Add restXml protocol test for http label escaping #1759
Conversation
], | ||
params: { | ||
Bucket: "mybucket", | ||
Key: "my key.txt" |
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.
Can we add another test with a path in the key? Something like foo/bar/my key.txt
. I'd expect this to be encoded as foo/bar/my%20key.txt
and not foo%2Fbar%2Fmy%20key.txt
, is that the case?
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.
Your expectation is correct and I agree that's a good test to add, thanks for calling it out. I pushed an update including that test.
2609a30
to
674628e
Compare
Adds an httpRequestTests case to restXml protocol tests to verify that httpLabel bindings in the request URI are percent-encoded. restJson1 had an existing test case for this, but was updated to verify the space character is encoded. An operation was also added to the testing S3 service model with httpRequestTests to verify the same thing, but with S3's virtual host addressing. No other protocols had tests added, because restJson1 and restXml are the only protocols that support httpLabel bindings. Changes were tested by generating and running protocol tests in aws-sdk-go-v2 and aws-sdk-js-v3, confirming the new test case is generated and runs successfully.
674628e
to
12eb715
Compare
smithy-lang/smithy#1562 was upstreamed and then the test was tweaked in smithy-lang/smithy#1759.
Adds an httpRequestTests case to restXml protocol tests to verify that httpLabel bindings in the request URI are percent-encoded. restJson1 had an existing test case for this, but was updated to verify the space character is encoded. An operation was also added to the testing S3 service model with httpRequestTests to verify the same thing, but with S3's virtual host addressing. No other protocols had tests added, because restJson1 and restXml are the only protocols that support httpLabel bindings. Changes were tested by generating and running protocol tests in aws-sdk-go-v2 and aws-sdk-js-v3, confirming the new test case is generated and runs successfully.
Issue #, if available:
Description of changes:
Adds an httpRequestTests case to restXml protocol tests to verify that httpLabel bindings in the request URI are percent-encoded. restJson1 had an existing test case for this, but was updated to verify the space character is encoded. An operation was also added to the testing S3 service model with httpRequestTests to verify the same thing, but with S3's virtual host addressing. No other protocols had tests added, because restJson1 and restXml are the only protocols that support httpLabel bindings.
Changes were tested by generating and running protocol tests in aws-sdk-go-v2 and aws-sdk-js-v3, confirming the new test case is generated and runs successfully.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.