Fix header return value from HTTPRequest:finish, now returns both name and value again

This commit is contained in:
jacob1 2023-12-30 15:40:28 -05:00
parent 25c65310bd
commit 5a762524b8
No known key found for this signature in database
GPG Key ID: 4E58A32D510E1995

View File

@ -223,7 +223,7 @@ static int http_request_finish(lua_State *l)
lua_pushlstring(l, headers[i].name.data(), headers[i].name.size()); lua_pushlstring(l, headers[i].name.data(), headers[i].name.size());
lua_rawseti(l, -2, 1); lua_rawseti(l, -2, 1);
lua_pushlstring(l, headers[i].value.data(), headers[i].value.size()); lua_pushlstring(l, headers[i].value.data(), headers[i].value.size());
lua_rawseti(l, -2, 1); lua_rawseti(l, -2, 2);
lua_rawseti(l, -2, i + 1); lua_rawseti(l, -2, i + 1);
} }
return 3; return 3;