aboutsummaryrefslogtreecommitdiff
path: root/src/url.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-16 22:51:04 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-16 22:51:04 +0000
commit9fc682a106f13901b60a665619fc61d9dae49fb0 (patch)
tree6efdd73fa4f2abce56b6fb710f7516d0a5c6c758 /src/url.lua
parent574708380f19b15bd19419bfd64ccbe422f2d924 (diff)
downloadluasocket-9fc682a106f13901b60a665619fc61d9dae49fb0.tar.gz
luasocket-9fc682a106f13901b60a665619fc61d9dae49fb0.tar.bz2
luasocket-9fc682a106f13901b60a665619fc61d9dae49fb0.zip
HTTP now has only one function.
Diffstat (limited to '')
-rw-r--r--src/url.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/url.lua b/src/url.lua
index ec26e62..c708e19 100644
--- a/src/url.lua
+++ b/src/url.lua
@@ -115,7 +115,8 @@ end
115----------------------------------------------------------------------------- 115-----------------------------------------------------------------------------
116function parse(url, default) 116function parse(url, default)
117 -- initialize default parameters 117 -- initialize default parameters
118 local parsed = default or {} 118 local parsed = {}
119 for i,v in (default or parsed) do parsed[i] = v end
119 -- empty url is parsed to nil 120 -- empty url is parsed to nil
120 if not url or url == "" then return nil, "invalid url" end 121 if not url or url == "" then return nil, "invalid url" end
121 -- remove whitespace 122 -- remove whitespace