From 5594f70fe4276405961ab6e7fc3bdf52e626d04b Mon Sep 17 00:00:00 2001 From: hkc Date: Tue, 3 Oct 2023 18:25:40 +0300 Subject: [PATCH] Oopsie --- tapeget.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tapeget.lua b/tapeget.lua index 67d08ab..62772cd 100644 --- a/tapeget.lua +++ b/tapeget.lua @@ -11,13 +11,10 @@ if not http then return end -local block_size = 8192 - tape.stop() tape.seek(-tape.getSize()) tape.stop() - local req = http.get(args[1], {}, true) if not req then print("oopsie") @@ -25,12 +22,10 @@ if not req then end while true do - local chunk = req.read(block_size) + local chunk = req.read() if not chunk then print("EOF") end - for i = 1, #chunk do - tape.write(chunk[i]) - end + tape.write(chunk) end