1
0

Can now receive POST data in WebPlugins!

Fixed Debug With optimized Noise in VS2010 by having it run the correct MCServer_debug.exe instead of MCServer.exe
Changed winsock.h to Winsock2.h in Globals.h so sockets can be graciously closed (See webserver Socket::Close() )

git-svn-id: http://mc-server.googlecode.com/svn/trunk@197 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth
2012-01-31 00:38:18 +00:00
parent f4583fda98
commit c142424571
14 changed files with 224 additions and 117 deletions

View File

@@ -76,13 +76,13 @@ std::string cWebPlugin_Lua::HandleRequest( HTTPRequest* a_Request )
if( Tab )
{
LOGINFO("1. Stack size: %i", lua_gettop(LuaState) );
//LOGINFO("1. Stack size: %i", lua_gettop(LuaState) );
lua_rawgeti( LuaState, LUA_REGISTRYINDEX, Tab->Reference); // same as lua_getref()
LOGINFO("2. Stack size: %i", lua_gettop(LuaState) );
//LOGINFO("2. Stack size: %i", lua_gettop(LuaState) );
// Push HTTPRequest
tolua_pushusertype( LuaState, a_Request, "HTTPRequest" );
LOGINFO("Calling bound function! :D");
//LOGINFO("Calling bound function! :D");
int s = lua_pcall( LuaState, 1, 1, 0);
if ( s != 0 )
@@ -103,7 +103,7 @@ std::string cWebPlugin_Lua::HandleRequest( HTTPRequest* a_Request )
RetVal += tolua_tostring(LuaState, -1, 0);
lua_pop(LuaState, 1); // Pop return value
LOGINFO("ok. Stack size: %i", lua_gettop(LuaState) );
//LOGINFO("ok. Stack size: %i", lua_gettop(LuaState) );
}
return RetVal;