Skip to content

Commit cbd40a4

Browse files
committed
fix(*): variable scope
1 parent a13a887 commit cbd40a4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/resty/aws/request/execute.lua

+5-3
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,17 @@ local function execute_request(signed_request)
5555
if response.headers["application/vnd.amazon.eventstream"] then
5656
body_reader = response.body_reader
5757
else
58-
body do
58+
local this_body do
5959
if response.has_body then
60-
body, err = response:read_body()
61-
if not body then
60+
this_body, err = response:read_body()
61+
if not this_body then
6262
return nil, ("failed reading response body from '%s:%s': %s"):format(
6363
tostring(signed_request.host),
6464
tostring(signed_request.port),
6565
tostring(err))
6666
end
67+
68+
body = this_body
6769
end
6870
end
6971
end

0 commit comments

Comments
 (0)