From 47e644031fed0ced1066ff843c9b42d45b54042d Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Mon, 20 Mar 2017 16:56:15 -0300 Subject: [PATCH] Preserve path when parsing urls. --- src/url.lua | 5 +++-- test/auth/.htaccess | 2 +- 2 files changed, 4 insertions(+), 3 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 -- a stringing with the corresponding URL ----------------------------------------------------------------------------- function _M.build(parsed) - local ppath = _M.parse_path(parsed.path or "") - local url = _M.build_path(ppath) + --local ppath = _M.parse_path(parsed.path or "") + --local url = _M.build_path(ppath) + local url = parsed.path or "" if parsed.params then url = url .. ";" .. parsed.params end if parsed.query then url = url .. "?" .. parsed.query end local authority = parsed.authority diff --git a/test/auth/.htaccess b/test/auth/.htaccess index bb2794a..2509ae3 100644 --- a/test/auth/.htaccess +++ b/test/auth/.htaccess @@ -1,4 +1,4 @@ AuthName "test-auth" AuthType Basic - AuthUserFile /Users/diego/impa/luasocket/test/auth/.htpasswd + AuthUserFile /home/diego/impa/luasocket/test/auth/.htpasswd Require valid-user