mirror of https://github.com/apache/jclouds.git
JCLOUDS-766: URL encode path for v4 signatures
Addresses AWSS3BlobIntegrationLiveTest.deleteObject test failures.
This commit is contained in:
parent
2501122a20
commit
feae011c4d
|
@ -76,6 +76,8 @@ public abstract class Aws4SignerBase {
|
|||
// A-Z, a-z, 0-9, hyphen (-), underscore (_), period (.), and tilde (~).
|
||||
private static final Escaper AWS_URL_PARAMETER_ESCAPER;
|
||||
|
||||
private static final Escaper AWS_PATH_ESCAPER = new PercentEscaper("/-_.~", false);
|
||||
|
||||
static {
|
||||
timestampFormat = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'");
|
||||
timestampFormat.setTimeZone(GMT);
|
||||
|
@ -384,7 +386,7 @@ public abstract class Aws4SignerBase {
|
|||
canonicalRequest.append(method).append("\n");
|
||||
|
||||
// CanonicalURI + '\n' +
|
||||
canonicalRequest.append(endpoint.getPath()).append("\n");
|
||||
canonicalRequest.append(AWS_PATH_ESCAPER.escape(endpoint.getPath())).append("\n");
|
||||
|
||||
// CanonicalQueryString + '\n' +
|
||||
if (endpoint.getQuery() != null) {
|
||||
|
|
Loading…
Reference in New Issue