mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 10:20:29 +00:00
Rename redbean Lua function GetPayload to GetBody
This breaking change improves consistency with RFC 7230 terminology.
This commit is contained in:
parent
cde92c3944
commit
d60e855870
2 changed files with 5 additions and 6 deletions
|
@ -604,6 +604,9 @@ FUNCTIONS
|
||||||
Returns byte size of uncompressed contents of ZIP asset (or local
|
Returns byte size of uncompressed contents of ZIP asset (or local
|
||||||
file if the -D flag is used)
|
file if the -D flag is used)
|
||||||
|
|
||||||
|
GetBody() → str
|
||||||
|
Returns the request message body if present or an empty string.
|
||||||
|
|
||||||
GetCookie(name:str) → str
|
GetCookie(name:str) → str
|
||||||
Returns cookie value.
|
Returns cookie value.
|
||||||
|
|
||||||
|
@ -716,10 +719,6 @@ FUNCTIONS
|
||||||
GetTime() → seconds:number
|
GetTime() → seconds:number
|
||||||
Returns current time as a UNIX timestamp with 0.0001s precision.
|
Returns current time as a UNIX timestamp with 0.0001s precision.
|
||||||
|
|
||||||
GetPayload() → str
|
|
||||||
Returns the request message payload, or empty string if there
|
|
||||||
isn't one.
|
|
||||||
|
|
||||||
GetUrl() → str
|
GetUrl() → str
|
||||||
Returns the effective Request-URL as an ASCII string, where
|
Returns the effective Request-URL as an ASCII string, where
|
||||||
illegal characters or UTF-8 is guaranteed to be percent encoded,
|
illegal characters or UTF-8 is guaranteed to be percent encoded,
|
||||||
|
|
|
@ -4097,7 +4097,7 @@ static int LuaParseHttpDateTime(lua_State *L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int LuaGetPayload(lua_State *L) {
|
static int LuaGetBody(lua_State *L) {
|
||||||
lua_pushlstring(L, inbuf.p + hdrsize, payloadlength);
|
lua_pushlstring(L, inbuf.p + hdrsize, payloadlength);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -5328,6 +5328,7 @@ static const luaL_Reg kLuaFuncs[] = {
|
||||||
{"GetAssetComment", LuaGetAssetComment}, //
|
{"GetAssetComment", LuaGetAssetComment}, //
|
||||||
{"GetAssetMode", LuaGetAssetMode}, //
|
{"GetAssetMode", LuaGetAssetMode}, //
|
||||||
{"GetAssetSize", LuaGetAssetSize}, //
|
{"GetAssetSize", LuaGetAssetSize}, //
|
||||||
|
{"GetBody", LuaGetBody}, //
|
||||||
{"GetClientAddr", LuaGetClientAddr}, //
|
{"GetClientAddr", LuaGetClientAddr}, //
|
||||||
{"GetCookie", LuaGetCookie}, //
|
{"GetCookie", LuaGetCookie}, //
|
||||||
{"GetDate", LuaGetDate}, //
|
{"GetDate", LuaGetDate}, //
|
||||||
|
@ -5347,7 +5348,6 @@ static const luaL_Reg kLuaFuncs[] = {
|
||||||
{"GetParams", LuaGetParams}, //
|
{"GetParams", LuaGetParams}, //
|
||||||
{"GetPass", LuaGetPass}, //
|
{"GetPass", LuaGetPass}, //
|
||||||
{"GetPath", LuaGetPath}, //
|
{"GetPath", LuaGetPath}, //
|
||||||
{"GetPayload", LuaGetPayload}, //
|
|
||||||
{"GetPort", LuaGetPort}, //
|
{"GetPort", LuaGetPort}, //
|
||||||
{"GetRandomBytes", LuaGetRandomBytes}, //
|
{"GetRandomBytes", LuaGetRandomBytes}, //
|
||||||
{"GetRedbeanVersion", LuaGetRedbeanVersion}, //
|
{"GetRedbeanVersion", LuaGetRedbeanVersion}, //
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue