diff options
author | Diego Nehab <diego.nehab@gmail.com> | 2017-03-20 16:56:15 -0300 |
---|---|---|
committer | Diego Nehab <diego.nehab@gmail.com> | 2017-03-20 16:56:15 -0300 |
commit | 47e644031fed0ced1066ff843c9b42d45b54042d (patch) | |
tree | 53fe5cd2ffb1f43e726c6e11c89c8a8ebd8e120f /src | |
parent | 1b4debffee52e69a2d523cea5d2c308e7cb3b187 (diff) | |
download | luasocket-47e644031fed0ced1066ff843c9b42d45b54042d.tar.gz luasocket-47e644031fed0ced1066ff843c9b42d45b54042d.tar.bz2 luasocket-47e644031fed0ced1066ff843c9b42d45b54042d.zip |
Preserve path when parsing urls.
Diffstat (limited to 'src')
-rw-r--r-- | src/url.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/url.lua b/src/url.lua index eb094d5..1e5a3f6 100644 --- a/src/url.lua +++ b/src/url.lua | |||
@@ -183,8 +183,9 @@ end | |||
183 | -- a stringing with the corresponding URL | 183 | -- a stringing with the corresponding URL |
184 | ----------------------------------------------------------------------------- | 184 | ----------------------------------------------------------------------------- |
185 | function _M.build(parsed) | 185 | function _M.build(parsed) |
186 | local ppath = _M.parse_path(parsed.path or "") | 186 | --local ppath = _M.parse_path(parsed.path or "") |
187 | local url = _M.build_path(ppath) | 187 | --local url = _M.build_path(ppath) |
188 | local url = parsed.path or "" | ||
188 | if parsed.params then url = url .. ";" .. parsed.params end | 189 | if parsed.params then url = url .. ";" .. parsed.params end |
189 | if parsed.query then url = url .. "?" .. parsed.query end | 190 | if parsed.query then url = url .. "?" .. parsed.query end |
190 | local authority = parsed.authority | 191 | local authority = parsed.authority |