forked from hkc/cc-stuff
1
0
Fork 0
This commit is contained in:
Casey 2023-10-03 18:25:40 +03:00
parent 24dae1a04e
commit 5594f70fe4
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 2 additions and 7 deletions

View File

@ -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