Skip to content

Commit

Permalink
#288 #457 Stricter check
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Sep 26, 2019
1 parent abd23b6 commit a628ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Runtime/LambdaRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function failInitialization(string $message, ?\Throwable $error = null):
private function postJson(string $url, $data): void
{
$contentType = $data['multiValueHeaders']['content-type'][0] ?? null;
if ($contentType && $contentType !== 'application/json' && substr($contentType, 0, 4) !== 'text') {
if ($contentType && $contentType !== 'application/json' && substr($contentType, 0, 5) !== 'text/') {
$data['body'] = base64_encode($data['body']);
$data['isBase64Encoded'] = true;
}
Expand Down

0 comments on commit a628ebb

Please sign in to comment.