Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16bd043

Browse files
committed
bugfix: return the correct flag when the request body callback works done
1 parent 6653de2 commit 16bd043

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ Sends a HTTP request to peer,
242242

243243
In case of failure, `nil` and a Lua string will describes the error reason will be given.
244244

245-
the `headers`, should be a hash-like Lua table represent the HTTP request headers, it is worth noting that this library doesn't take care of the HTTP headers' semantics, so it's callers' responsibility to supply this, and callers should implement any necessary conversions, for example, `Host` should be converted to `:authority`. Also, the following headers will be ignored as they are CONNECTION specific.
245+
the `headers`, should be a array-like Lua table represent the HTTP request headers, each entry is like `{ name = "header1", value = "value1" }`.
246+
247+
It is worth noting that this library doesn't take care of the HTTP headers' semantics, so it's callers' responsibility to supply this, and callers should implement any necessary conversions, for example, `Host` should be converted to `:authority`. Also, the following headers will be ignored as they are CONNECTION specific.
246248

247249
* `Connection`
248250
* `Keep-Alive`

lib/resty/http2.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ local function get_data_wrapper(data)
2525

2626
return function(max_frame_size)
2727
if is_func(data) then
28-
return data(max_frame_size)
28+
local part = data(max_frame_size)
29+
return part, part == ""
2930
end
3031

3132
local data_size = #data

0 commit comments

Comments
 (0)