annotate src/admin/request.txt.luan @ 12:c560b4e2f056

subdir for repos logs
author Vadim Filimonov <fffilimonov@yandex.ru>
date Thu, 28 Jul 2022 16:16:22 +0300
parents dfc36e7ed22c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 local Binary = require "luan:Binary.luan"
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2 local Io = require "luan:Io.luan"
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 local Http = require "luan:http/Http.luan"
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6 return function()
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 Io.stdout = Http.response.text_writer()
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8 %><%= Http.request.raw_head %><%
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9 if Http.request.body ~= nil then
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10 %><%=Binary.to_string(Http.request.body,"utf-8")%><%
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11 end
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 end