mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Add ProgramMaxPayloadSize() API to Redbean
This way we don't have to use the flag and can configure it using .init.lua instead.
This commit is contained in:
parent
2528536cff
commit
f8520e10b2
2 changed files with 22 additions and 1 deletions
|
@ -4592,6 +4592,11 @@ static int LuaProgramGid(lua_State *L) {
|
|||
return LuaProgramInt(L, ProgramGid);
|
||||
}
|
||||
|
||||
static int LuaProgramMaxPayloadSize(lua_State *L) {
|
||||
OnlyCallFromInitLua(L, "ProgramMaxPayloadSize");
|
||||
return LuaProgramInt(L, ProgramMaxPayloadSize);
|
||||
}
|
||||
|
||||
static int LuaGetClientFd(lua_State *L) {
|
||||
OnlyCallDuringConnection(L, "GetClientFd");
|
||||
lua_pushinteger(L, client);
|
||||
|
@ -4954,17 +4959,18 @@ static const char *const kDontAutoComplete[] = {
|
|||
"HasParam", //
|
||||
"IsClientUsingSsl", //
|
||||
"LaunchBrowser", //
|
||||
"LuaProgramSslRequired", // TODO
|
||||
"ProgramAddr", // TODO
|
||||
"ProgramBrand", //
|
||||
"ProgramCertificate", // TODO
|
||||
"ProgramGid", //
|
||||
"ProgramLogPath", // TODO
|
||||
"ProgramMaxPayloadSize", // TODO
|
||||
"ProgramPidPath", // TODO
|
||||
"ProgramPort", // TODO
|
||||
"ProgramPrivateKey", // TODO
|
||||
"ProgramSslCiphersuite", // TODO
|
||||
"ProgramSslClientVerify", // TODO
|
||||
"LuaProgramSslRequired", // TODO
|
||||
"ProgramSslCompression", //
|
||||
"ProgramSslTicketLifetime", //
|
||||
"ProgramTimeout", // TODO
|
||||
|
@ -5095,6 +5101,7 @@ static const luaL_Reg kLuaFuncs[] = {
|
|||
{"ProgramLogBodies", LuaProgramLogBodies}, //
|
||||
{"ProgramLogMessages", LuaProgramLogMessages}, //
|
||||
{"ProgramLogPath", LuaProgramLogPath}, //
|
||||
{"ProgramMaxPayloadSize", LuaProgramMaxPayloadSize}, //
|
||||
{"ProgramPidPath", LuaProgramPidPath}, //
|
||||
{"ProgramPort", LuaProgramPort}, //
|
||||
{"ProgramRedirect", LuaProgramRedirect}, //
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue