1 local httpstreams
= { [[
15 Transfer-Encoding: chunked
32 local http_parser
= require
"net.http.parser";
34 describe("net.http.parser", function()
35 describe("#new()", function()
36 it("should work", function()
37 for _
, stream
in ipairs(httpstreams
) do
39 local function success_cb(packet
)
42 stream
= stream
:gsub("\n", "\r\n");
43 local parser
= http_parser
.new(success_cb
, error, stream
:sub(1,4) == "HTTP" and "client" or "server")
44 for chunk
in stream
:gmatch("..?.?") do
48 assert.is_true(success
);