-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Redo URL encoding to cover all cases * Fix test that missed a couple of encodings * Should have been escaping !
- Loading branch information
Showing
9 changed files
with
68 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ pub mod query; | |
pub mod response; | ||
pub mod result; | ||
pub mod retry; | ||
mod urlencode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
use percent_encoding::{AsciiSet, CONTROLS}; | ||
|
||
/// base set of characters that must be URL encoded | ||
pub const BASE_SET: &AsciiSet = &CONTROLS | ||
.add(b' ') | ||
.add(b'/') | ||
// RFC-3986 §3.3 allows sub-delims (defined in section2.2) to be in the path component. | ||
// This includes both colon ':' and comma ',' characters. | ||
// Smithy protocol tests & AWS services percent encode these expected values. Signing | ||
// will fail if these values are not percent encoded | ||
.add(b':') | ||
.add(b',') | ||
.add(b'?') | ||
.add(b'#') | ||
.add(b'[') | ||
.add(b')') | ||
.add(b')') | ||
.add(b'@') | ||
.add(b'!') | ||
.add(b'$') | ||
.add(b'&') | ||
.add(b'\'') | ||
.add(b'(') | ||
.add(b')') | ||
.add(b'*') | ||
.add(b'+') | ||
.add(b';') | ||
.add(b'=') | ||
.add(b'%'); |