HTTP now has only one function.

This commit is contained in:
Diego Nehab 2004-06-16 22:51:04 +00:00
parent 574708380f
commit 9fc682a106
4 changed files with 24 additions and 33 deletions

View file

@ -115,7 +115,8 @@ end
-----------------------------------------------------------------------------
function parse(url, default)
-- initialize default parameters
local parsed = default or {}
local parsed = {}
for i,v in (default or parsed) do parsed[i] = v end
-- empty url is parsed to nil
if not url or url == "" then return nil, "invalid url" end
-- remove whitespace