From 0fd88a07a4951d6e06e20f7c3dcc5c115cd78ace Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 9 Feb 2023 22:57:32 +0000 Subject: net.http.parser: Improve handling of responses without content-length This ensures that we support responses without a content-length header, and allow streaming them through the streaming handler interface. An example of such a response would be Server-Sent Events streams. --- spec/net_http_parser_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/net_http_parser_spec.lua b/spec/net_http_parser_spec.lua index f71cad20..ed70c431 100644 --- a/spec/net_http_parser_spec.lua +++ b/spec/net_http_parser_spec.lua @@ -87,7 +87,7 @@ o ]], { - body = "Hello", count = 2; + body = "Hello", count = 3; } ); end); @@ -116,7 +116,7 @@ o ]], { - body = "Hello", count = 3; + body = "Hello", count = 4; } ); end); @@ -129,7 +129,7 @@ o assert.equal("25930f021785ae14053a322c2dbc1897c3769720", sha1(data, true), "test data malformed"); test_stream(data, { - body = string.rep("~", 11085), count = 2; + body = string.rep("~", 11085), count = 3; }); end); end); -- cgit v1.2.3