Mercurial Hosting > luan
comparison 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 |
comparison
equal
deleted
inserted
replaced
1159:3ef883468fd0 | 1160:4beabb087be6 |
---|---|
65 out.close() | 65 out.close() |
66 local s = string_uri.read_text() | 66 local s = string_uri.read_text() |
67 return s ~= "" and s or nil | 67 return s ~= "" and s or nil |
68 end | 68 end |
69 | 69 |
70 function this.url() | 70 function this.full_path() -- compatible with impl |
71 local url = this.scheme.."://"..this.headers["host"]..this.path | 71 local path = this.path |
72 if this.method ~= "POST" then | 72 if this.method ~= "POST" then |
73 local query = this.query_string() | 73 local query = this.query_string() |
74 if query ~= nil then | 74 if query ~= nil then |
75 url = url.."?"..query | 75 path = path.."?"..query |
76 end | 76 end |
77 end | 77 end |
78 return url | 78 return path |
79 end | |
80 | |
81 function this.url() | |
82 return this.scheme.."://"..this.headers["host"]..this.full_path() | |
79 end | 83 end |
80 | 84 |
81 return this | 85 return this |
82 end | 86 end |
83 | 87 |