Skip to content

Commit

Permalink
URL-decode subresource values as well as other query parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
shino committed Mar 12, 2015
1 parent eb83937 commit 2930831
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions lib/signers/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,7 @@ AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, {
if (this.subResources[name] || this.responseHeaders[name]) {
var subresource = { name: name };
if (value !== undefined) {
if (this.subResources[name]) {
subresource.value = value;
} else {
subresource.value = decodeURIComponent(value);
}
subresource.value = decodeURIComponent(value);
}
resources.push(subresource);
}
Expand Down
2 changes: 1 addition & 1 deletion test/signers/s3.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ describe 'AWS.Signers.S3', ->
x-amz-date:DATE-STRING
/?versionId=a%2Bb
/?versionId=a+b
""")

it 'includes the non-encoded query string get header overrides', ->
Expand Down

0 comments on commit 2930831

Please sign in to comment.