diff --git a/samcli/local/apigw/service.py b/samcli/local/apigw/service.py index a1ec1b67d7..9b2631b958 100644 --- a/samcli/local/apigw/service.py +++ b/samcli/local/apigw/service.py @@ -298,8 +298,11 @@ def _parse_lambda_output(lambda_output, binary_types, flask_request): # If the customer doesn't define Content-Type default to application/json if "Content-Type" not in headers: - LOG.info("No Content-Type given. Defaulting to 'application/json'.") - headers["Content-Type"] = "application/json" + if "content-type" in headers: + headers["Content-Type"] = headers["content-type"] + else: + LOG.info("No Content-Type given. Defaulting to 'application/json'.") + headers["Content-Type"] = "application/json" if Service._should_base64_decode_body(binary_types, flask_request, headers, is_base_64_encoded): body = base64.b64decode(body)