Removed (now) unneeded table test from get_headers().
This commit is contained in:
parent
b9001f0d71
commit
e7c855f089
@ -108,15 +108,12 @@ static void curl_init()
|
||||
|
||||
static void get_headers(lua_State* L, int headersIndex, struct curl_slist** headers)
|
||||
{
|
||||
if (lua_istable(L, headersIndex))
|
||||
lua_pushnil(L);
|
||||
while (lua_next(L, headersIndex) != 0)
|
||||
{
|
||||
lua_pushnil(L);
|
||||
while (lua_next(L, headersIndex) != 0)
|
||||
{
|
||||
const char *item = luaL_checkstring(L, -1);
|
||||
lua_pop(L, 1);
|
||||
*headers = curl_slist_append(*headers, item);
|
||||
}
|
||||
const char *item = luaL_checkstring(L, -1);
|
||||
lua_pop(L, 1);
|
||||
*headers = curl_slist_append(*headers, item);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user