parent
365e84fec3
commit
87c00d2291
|
@ -41,6 +41,7 @@ srv:add_action("/lua", function(cl, opt)
|
|||
uh.chunk_send(cl, string.format("<h1>REMOTE_ADDR: %s</h1>", opt.peer_addr))
|
||||
uh.chunk_send(cl, string.format("<h1>METHOD: %s</h1>", opt.method))
|
||||
uh.chunk_send(cl, string.format("<h1>HTTP Version: %s</h1>", opt.version))
|
||||
uh.chunk_send(cl, string.format("<h1>PATH: %s</h1>", opt.path))
|
||||
uh.chunk_send(cl, string.format("<h1>URL: %s</h1>", opt.url))
|
||||
uh.chunk_send(cl, string.format("<h1>QUERY: %s</h1>", opt.query))
|
||||
uh.chunk_send(cl, string.format("<h1>Body: %s</h1>", opt.body and opt.body or ""))
|
||||
|
|
|
@ -101,6 +101,9 @@ static void lua_uh_action(struct uh_client *cl)
|
|||
lua_pushstring(L, cl->get_version(cl));
|
||||
lua_setfield(L, -2, "version");
|
||||
|
||||
lua_pushstring(L, cl->get_path(cl));
|
||||
lua_setfield(L, -2, "path");
|
||||
|
||||
lua_pushstring(L, cl->get_url(cl));
|
||||
lua_setfield(L, -2, "url");
|
||||
|
||||
|
|
Loading…
Reference in New Issue