mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-10 20:00:27 +00:00
Update GetStatus to return status code set by redbean itself (outside of Lua code)
This commit is contained in:
parent
e7957287da
commit
cd319f7958
1 changed files with 3 additions and 2 deletions
|
@ -3365,7 +3365,7 @@ static int LuaSetStatus(lua_State *L) {
|
||||||
|
|
||||||
static int LuaGetStatus(lua_State *L) {
|
static int LuaGetStatus(lua_State *L) {
|
||||||
OnlyCallDuringRequest(L, "GetStatus");
|
OnlyCallDuringRequest(L, "GetStatus");
|
||||||
if (!luaheaderp) {
|
if (!statuscode) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
} else {
|
} else {
|
||||||
lua_pushinteger(L, statuscode);
|
lua_pushinteger(L, statuscode);
|
||||||
|
@ -6360,8 +6360,9 @@ static void InitRequest(void) {
|
||||||
msgsize = 0;
|
msgsize = 0;
|
||||||
loops.n = 0;
|
loops.n = 0;
|
||||||
generator = 0;
|
generator = 0;
|
||||||
luaheaderp = 0;
|
|
||||||
isyielding = 0;
|
isyielding = 0;
|
||||||
|
luaheaderp = 0;
|
||||||
|
statuscode = 0;
|
||||||
contentlength = 0;
|
contentlength = 0;
|
||||||
referrerpolicy = 0;
|
referrerpolicy = 0;
|
||||||
gotcachecontrol = 0;
|
gotcachecontrol = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue