From c3cd39544bf70c5408eb2775191afa0b400e9123 Mon Sep 17 00:00:00 2001 From: Izaya Date: Fri, 22 Jun 2018 12:58:45 +1000 Subject: [PATCH] fixed fget --- FRequest/OpenOS/usr/bin/fget.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FRequest/OpenOS/usr/bin/fget.lua b/FRequest/OpenOS/usr/bin/fget.lua index 2e859af..928c2e2 100644 --- a/FRequest/OpenOS/usr/bin/fget.lua +++ b/FRequest/OpenOS/usr/bin/fget.lua @@ -1,7 +1,7 @@ local net = require "net" local event = require "event" -local function parseurl(url) +local function parseURL(url) local proto,addr = url:match("(.-)://(.+)") addr = addr or url local hp, path = addr:match("(.-)(/.*)") @@ -13,6 +13,7 @@ end local tArgs = {...} local proto, host, port, path = parseURL(tArgs[1]) +port = tonumber(port) or 70 local socket = net.open(host,port) socket:write("t"..path.."\n")