Rename GetVersion to GetHttpVersion for consistency (#97).

This commit is contained in:
Paul Kulchenko 2021-07-29 20:09:46 -07:00
parent 338c0e03bd
commit 2179c3aa98
2 changed files with 4 additions and 4 deletions

View file

@ -664,13 +664,13 @@ FUNCTIONS
if redbean is being used as an HTTP proxy server. In the future
this API might change to return an object instead.
GetVersion() → int
GetHttpVersion() → int
Returns the request HTTP protocol version, which can be 9 for
HTTP/0.9, 10 for HTTP/1.0, or 11 for HTTP/1.1.
GetRedbeanVersion() → int
Returns the Redbean version in the format 0xMMmmpp, with major (MM),
minor (mm), and patch (pp) versions encoded, so that version 1.4
minor (mm), and patch (pp) versions encoded. The version value 1.4
would be represented as 0x010400.
GetZipPaths() → array[str]

View file

@ -4018,7 +4018,7 @@ static int LuaGetDate(lua_State *L) {
return 1;
}
static int LuaGetVersion(lua_State *L) {
static int LuaGetHttpVersion(lua_State *L) {
lua_pushinteger(L, msg.version);
return 1;
}
@ -5204,7 +5204,7 @@ static const luaL_Reg kLuaFuncs[] = {
{"GetServerAddr", LuaGetServerAddr}, //
{"GetUrl", LuaGetUrl}, //
{"GetUser", LuaGetUser}, //
{"GetVersion", LuaGetVersion}, //
{"GetHttpVersion", LuaGetHttpVersion}, //
{"GetRedbeanVersion", LuaGetRedbeanVersion}, //
{"GetZipPaths", LuaGetZipPaths}, //
{"HasControlCodes", LuaHasControlCodes}, //