You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometines,the get_next_chunk() function and the get_body_chars() function in lua-http stream does not return full body of the request.
Currently, when I make a request with a content length of 1.1MB, the get_next_chunk() function only returns 1MB of data. This results in an incomplete body being processed. Due to this in "get_body_chars(n, timeout)", a condition is met where the block size( n ) exceeds the available body size, causing an infinite loop. No error is thrown in this case, and the timeout does not work.
below is the Lua pseudo code how did I use :
`
function (http_stream)
return coroutine :
for chunk in http_stream:get_body_chars():
get chunk
yield chunk
end
end
`
but it works as expected and gives all chunks of data when I do the same outside the coroutine. Any reason?
The text was updated successfully, but these errors were encountered:
Sometines,the get_next_chunk() function and the get_body_chars() function in lua-http stream does not return full body of the request.
Currently, when I make a request with a content length of 1.1MB, the get_next_chunk() function only returns 1MB of data. This results in an incomplete body being processed. Due to this in "get_body_chars(n, timeout)", a condition is met where the block size( n ) exceeds the available body size, causing an infinite loop. No error is thrown in this case, and the timeout does not work.
below is the Lua pseudo code how did I use :
`
function (http_stream)
`
but it works as expected and gives all chunks of data when I do the same outside the coroutine. Any reason?
The text was updated successfully, but these errors were encountered: