mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-20 11:19:56 +00:00
Lua functionality change: print renamed to mg.write, read renamed to mg.read. Expanded user manual, fixed example pages.
This commit is contained in:
1 parent
d72645bf91
commit
2e232b3304
6 files changed
+311
-334
No files matched your search
+7
-7
@@ -467,13 +467,13 @@ static void test_lua(void) {
|
||||
ASSERT(lua_gettop(L) == 0);
|
||||
|
||||
check_lua_expr(L, "'hi'", "hi");
|
||||
check_lua_expr(L, "request_info.request_method", "POST");
|
||||
check_lua_expr(L, "request_info.uri", "/foo/bar");
|
||||
check_lua_expr(L, "request_info.num_headers", "2");
|
||||
check_lua_expr(L, "request_info.remote_ip", "0");
|
||||
check_lua_expr(L, "request_info.http_headers['Content-Length']", "12");
|
||||
check_lua_expr(L, "request_info.http_headers['Connection']", "close");
|
||||
(void) luaL_dostring(L, "post = read()");
|
||||
check_lua_expr(L, "mg.request_info.request_method", "POST");
|
||||
check_lua_expr(L, "mg.request_info.uri", "/foo/bar");
|
||||
check_lua_expr(L, "mg.request_info.num_headers", "2");
|
||||
check_lua_expr(L, "mg.request_info.remote_ip", "0");
|
||||
check_lua_expr(L, "mg.request_info.http_headers['Content-Length']", "12");
|
||||
check_lua_expr(L, "mg.request_info.http_headers['Connection']", "close");
|
||||
(void) luaL_dostring(L, "post = mg.read()");
|
||||
check_lua_expr(L, "# post", "12");
|
||||
check_lua_expr(L, "post", "hello world!");
|
||||
lua_close(L);
|
||||
|
||||
Reference in new issue
Block a user