# HG changeset patch # User Matthew Wild # Date 1598013711 -3600 # Node ID 388f599f66d1bead9121d95d0b2c430ced1031c1 # Parent 5550fc5e83f31019560d27cc94e499551fbbba4b net.http.parser: Add failing test for (large?) chunk-encoded responses diff -r 5550fc5e83f3 -r 388f599f66d1 spec/inputs/http/httpstream-chunked-test.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spec/inputs/http/httpstream-chunked-test.txt Fri Aug 21 13:41:51 2020 +0100 @@ -0,0 +1,15 @@ +HTTP/1.1 200 OK +Cache-Control: max-age=0, must-revalidate, private +Content-Type: application/json +Date: Fri, 21 Aug 2020 12:18:51 GMT +Expires: Fri, 21 Aug 2020 12:18:51 GMT +Server: Apache/2.4.38 (Debian) +Set-Cookie: PHPSESSID=00000000000000000000000000; path=/; HttpOnly +Strict-Transport-Security: max-age=29030400 +X-Powered-By: PHP/7.4.7 +Transfer-Encoding: chunked + +2b4d +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +0 + diff -r 5550fc5e83f3 -r 388f599f66d1 spec/net_http_parser_spec.lua --- a/spec/net_http_parser_spec.lua Thu Aug 20 16:43:27 2020 +0200 +++ b/spec/net_http_parser_spec.lua Fri Aug 21 13:41:51 2020 +0100 @@ -1,4 +1,5 @@ local http_parser = require "net.http.parser"; +local sha1 = require "util.hashes".sha1; local function test_stream(stream, expect) local success_cb = spy.new(function (packet) @@ -115,4 +116,15 @@ ); end); end); + + pending("should handle large chunked responses", function () + local data = io.open("spec/inputs/httpstream-chunked-test.txt", "rb"):read("*a"); + + -- Just a sanity check... text editors and things may mess with line endings, etc. + assert.equal("25930f021785ae14053a322c2dbc1897c3769720", sha1(data, true), "test data malformed"); + + test_stream(data, { + body = string.rep("~", 11085), count = 2; + }); + end); end);