Mercurial Hosting > luan
diff src/luan/modules/http/jetty/Http.luan @ 1160:4beabb087be6
add http/impl
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 05 Feb 2018 22:33:59 -0700 |
parents | 3ef883468fd0 |
children | 3a0f58d09ee7 |
line wrap: on
line diff
--- a/src/luan/modules/http/jetty/Http.luan Mon Feb 05 12:37:59 2018 -0700 +++ b/src/luan/modules/http/jetty/Http.luan Mon Feb 05 22:33:59 2018 -0700 @@ -67,15 +67,19 @@ return s ~= "" and s or nil end - function this.url() - local url = this.scheme.."://"..this.headers["host"]..this.path + function this.full_path() -- compatible with impl + local path = this.path if this.method ~= "POST" then local query = this.query_string() if query ~= nil then - url = url.."?"..query + path = path.."?"..query end end - return url + return path + end + + function this.url() + return this.scheme.."://"..this.headers["host"]..this.full_path() end return this