From 9f173bca86bdba7635d725772e349249fa890eee Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 31 Mar 2025 13:21:04 -0500 Subject: typo --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net.c') diff --git a/src/net.c b/src/net.c index 32ab8dd..38e70ff 100644 --- a/src/net.c +++ b/src/net.c @@ -798,7 +798,7 @@ void* handle_client(void *_arg){ } parray_clear(par, FREE); - luaI_tsetv(L, req_idx, "paramaters", new_param_idx); + luaI_tsetv(L, req_idx, "parameters", new_param_idx); for(int z = 0; z != awa->len; z++){ char* path; -- cgit v1.2.3 From dc7e4527e88ed0c59e17c0ff04c01e1c92136e42 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 14 Apr 2025 14:03:08 -0500 Subject: config change, local support, overall fixes --- src/net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/net.c') diff --git a/src/net.c b/src/net.c index 38e70ff..9089f49 100644 --- a/src/net.c +++ b/src/net.c @@ -556,7 +556,7 @@ int l_srequest(lua_State* L){ int l_request(lua_State* L){ const char* host = luaL_checkstring(L, 1); - int sock = get_host((char*)host, lua_tostring(L, 2)); + int sock = get_host((char*)host, (char*)lua_tostring(L, 2)); char* path = "/"; if(lua_gettop(L) >= 3) @@ -809,6 +809,7 @@ void* handle_client(void *_arg){ luaL_loadbuffer(L, wowa->c, wowa->len, "fun"); int func = lua_gettop(L); + lua_assign_upvalues(L, func); //lua_pushvalue(L, func); // push function call lua_pushvalue(L, res_idx); //push methods related to dealing with the request @@ -816,6 +817,7 @@ void* handle_client(void *_arg){ //call the function if(lua_pcall(L, 2, 0, 0) != 0){ + printf("(net thread) %s\n", lua_tostring(L, -1)); //send an error message if send has not been called if(client_fd >= 0) net_error(client_fd, 500); @@ -941,7 +943,7 @@ int start_serv(lua_State* L, int port){ lua_getglobal(L, "_G"); //time_start(copy) - luaI_deepcopy(L, args->L, SKIP_GC); + luaI_copyvars(L, args->L); //time_end("copy", copy) lua_settop(L, old_top); -- cgit v1.2.3