Software /
code /
prosody
Diff
spec/net_http_parser_spec.lua @ 12882:9ed628635dc6 0.12
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.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 09 Feb 2023 22:57:32 +0000 |
parent | 11033:cb5555443852 |
child | 12889:94a99330ce87 |
line wrap: on
line diff
--- a/spec/net_http_parser_spec.lua Thu Feb 09 22:37:54 2023 +0000 +++ b/spec/net_http_parser_spec.lua Thu Feb 09 22:57:32 2023 +0000 @@ -87,7 +87,7 @@ ]], { - body = "Hello", count = 2; + body = "Hello", count = 3; } ); end); @@ -116,7 +116,7 @@ ]], { - body = "Hello", count = 3; + body = "Hello", count = 4; } ); end); @@ -129,7 +129,7 @@ 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);