Mercurial Hosting > luan
diff src/luan/modules/http/tools/Dump_mod.luan @ 1088:bae2d0c2576c
change module naming convention
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 26 Dec 2016 22:29:36 -0700 |
parents | e2eb55d86bb2 |
children | d30d400fd43d |
line wrap: on
line diff
--- a/src/luan/modules/http/tools/Dump_mod.luan Mon Dec 19 01:38:21 2016 -0700 +++ b/src/luan/modules/http/tools/Dump_mod.luan Mon Dec 26 22:29:36 2016 -0700 @@ -6,12 +6,12 @@ java() local HttpServicer = require "java:luan.modules.http.HttpServicer" -local M = {} +local Dump_mod = {} local to_http_header_name = HttpServicer.toHttpHeaderName -M.to_http_header_name = to_http_header_name +Dump_mod.to_http_header_name = to_http_header_name -function M.respond() +function Dump_mod.respond() Http.response.header.content_type = "text/plain" Io.stdout = Http.response.text_writer() @@ -24,7 +24,7 @@ %> <%=method%> <%=path%> <%=Http.request.protocol%> <% - M.dump_headers(Http.request.headers) + Dump_mod.dump_headers(Http.request.headers) %> <% @@ -36,7 +36,7 @@ end -function M.dump_headers(headers) +function Dump_mod.dump_headers(headers) for name, values in pairs(headers) do local header_name = to_http_header_name(name) for _, value in ipairs(values) do @@ -47,4 +47,4 @@ end end -return M +return Dump_mod