From dfc5df8d017e36176ee20df276748a764b8d21fb Mon Sep 17 00:00:00 2001 From: joelbarnard Date: Tue, 7 May 2019 22:30:35 -0400 Subject: [PATCH] Allow binary content to be returned from PHP To return Binary content through the ALB, it needs to be Base64 Encoded and the isBase64Encoded flag needs to be set to true. --- bootstrap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap b/bootstrap index 91969bd..827310e 100755 --- a/bootstrap +++ b/bootstrap @@ -231,7 +231,8 @@ while (true) { } else { $response["statusDescription"] = "$status Unknown"; } - $response["isBase64Encoded"] = false; + $response["body"] = base64_encode($response["body"]); + $response["isBase64Encoded"] = true; } $response_json = json_encode($response); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');