Restore GetPayload and GetComment for compatibility (marked as deprecated in the docs)

This commit is contained in:
Paul Kulchenko 2021-11-01 19:22:39 -07:00
parent 7c012321d6
commit 7f32b00f1a
2 changed files with 4 additions and 1 deletions

View file

@ -594,7 +594,7 @@ FUNCTIONS
GetAssetComment(path:str) → str
Returns comment text associated with asset in the ZIP central
directory.
directory. Also available as GetComment (deprecated).
GetAssetMode(path:str) → int
Returns UNIX-style octal mode for ZIP asset (or local file if the
@ -606,6 +606,7 @@ FUNCTIONS
GetBody() → str
Returns the request message body if present or an empty string.
Also available as GetPayload (deprecated).
GetCookie(name:str) → str
Returns cookie value.

View file

@ -5332,9 +5332,11 @@ static const luaL_Reg kLuaFuncs[] = {
{"FormatHttpDateTime", LuaFormatHttpDateTime}, //
{"FormatIp", LuaFormatIp}, //
{"GetAssetComment", LuaGetAssetComment}, //
{"GetComment", LuaGetAssetComment}, //
{"GetAssetMode", LuaGetAssetMode}, //
{"GetAssetSize", LuaGetAssetSize}, //
{"GetBody", LuaGetBody}, //
{"GetPayload", LuaGetBody}, //
{"GetClientAddr", LuaGetClientAddr}, //
{"GetCookie", LuaGetCookie}, //
{"GetDate", LuaGetDate}, //