File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ local FFI_AGAIN = base.FFI_AGAIN
1212local FFI_OK = base .FFI_OK
1313local get_request = base .get_request
1414local get_string_buf = base .get_string_buf
15+ local error = error
16+ local assert = assert
1517local getmetatable = getmetatable
1618local ngx = ngx
1719local ngx_phase = ngx .get_phase
@@ -43,7 +45,8 @@ local function get_setby_param(r, idx)
4345 return nil
4446 end
4547
46- return ffi_str (data_p [0 ], len_p [0 ])
48+ local s = ffi_str (data_p [0 ], len_p [0 ])
49+ return s
4750end
4851
4952
@@ -56,14 +59,16 @@ local function get_body_filter_param(r, idx)
5659 local buf = get_string_buf (len_p [0 ])
5760 assert (C .ngx_http_lua_ffi_copy_body_filter_param_body (r , buf )
5861 == FFI_OK )
59- return ffi_str (buf , len_p [0 ])
62+ local s = ffi_str (buf , len_p [0 ])
63+ return s
6064 end
6165
6266 if len_p [0 ] == 0 then
6367 return " "
6468 end
6569
66- return ffi_str (data_p [0 ], len_p [0 ])
70+ local s = ffi_str (data_p [0 ], len_p [0 ])
71+ return s
6772
6873 elseif idx == 2 then
6974 local rc = C .ngx_http_lua_ffi_get_body_filter_param_eof (r )
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ local function var_get(self, name)
9292 -- ngx.log(ngx.WARN, "rc = ", rc)
9393
9494 if rc == 0 then -- NGX_OK
95- return ffi_str (value_ptr [0 ], value_len [0 ])
95+ local s = ffi_str (value_ptr [0 ], value_len [0 ])
96+ return s
9697 end
9798
9899 if rc == - 5 then -- NGX_DECLINED
You can’t perform that action at this time.
0 commit comments