Skip to content

Commit 2d75299

Browse files
authored
Allows special char in S3 Bucket and Key (#616)
* Allows special char in S3 Bucket and Key * Add tests * Fix CS
1 parent 3201791 commit 2d75299

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## NOT RELEASED
4+
5+
### Fixed
6+
7+
- Fixed issue when Layer, Function or Version contained a special char `#`
8+
39
## 0.4.2
410

511
### Fixed

src/Input/AddLayerVersionPermissionRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function request(): Request
157157
throw new InvalidArgument(sprintf('Missing parameter "VersionNumber" for "%s". The value cannot be null.', __CLASS__));
158158
}
159159
$uri['VersionNumber'] = $v;
160-
$uriString = "/2018-10-31/layers/{$uri['LayerName']}/versions/{$uri['VersionNumber']}/policy";
160+
$uriString = '/2018-10-31/layers/' . rawurlencode($uri['LayerName']) . '/versions/' . rawurlencode($uri['VersionNumber']) . '/policy';
161161

162162
// Prepare Body
163163
$bodyPayload = $this->requestBody();

src/Input/InvocationRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function request(): Request
153153
throw new InvalidArgument(sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
154154
}
155155
$uri['FunctionName'] = $v;
156-
$uriString = "/2015-03-31/functions/{$uri['FunctionName']}/invocations";
156+
$uriString = '/2015-03-31/functions/' . rawurlencode($uri['FunctionName']) . '/invocations';
157157

158158
// Prepare Body
159159
$body = $this->Payload ?? '';

src/Input/ListLayerVersionsRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function request(): Request
115115
throw new InvalidArgument(sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
116116
}
117117
$uri['LayerName'] = $v;
118-
$uriString = "/2018-10-31/layers/{$uri['LayerName']}/versions";
118+
$uriString = '/2018-10-31/layers/' . rawurlencode($uri['LayerName']) . '/versions';
119119

120120
// Prepare Body
121121
$body = '';

src/Input/PublishLayerVersionRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function request(): Request
122122
throw new InvalidArgument(sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
123123
}
124124
$uri['LayerName'] = $v;
125-
$uriString = "/2018-10-31/layers/{$uri['LayerName']}/versions";
125+
$uriString = '/2018-10-31/layers/' . rawurlencode($uri['LayerName']) . '/versions';
126126

127127
// Prepare Body
128128
$bodyPayload = $this->requestBody();

0 commit comments

Comments
 (0)