diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-16 22:51:04 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-16 22:51:04 +0000 |
commit | 9fc682a106f13901b60a665619fc61d9dae49fb0 (patch) | |
tree | 6efdd73fa4f2abce56b6fb710f7516d0a5c6c758 /src/url.lua | |
parent | 574708380f19b15bd19419bfd64ccbe422f2d924 (diff) | |
download | luasocket-9fc682a106f13901b60a665619fc61d9dae49fb0.tar.gz luasocket-9fc682a106f13901b60a665619fc61d9dae49fb0.tar.bz2 luasocket-9fc682a106f13901b60a665619fc61d9dae49fb0.zip |
HTTP now has only one function.
Diffstat (limited to '')
-rw-r--r-- | src/url.lua | 3 |
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 | ----------------------------------------------------------------------------- |
116 | function parse(url, default) | 116 | function 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 |