From 2179c3aa98ab632616c02cf93de8c61d2e03f642 Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Thu, 29 Jul 2021 20:09:46 -0700 Subject: [PATCH] Rename GetVersion to GetHttpVersion for consistency (#97). --- tool/net/help.txt | 4 ++-- tool/net/redbean.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tool/net/help.txt b/tool/net/help.txt index 639d298ed..cd3dd91d0 100644 --- a/tool/net/help.txt +++ b/tool/net/help.txt @@ -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] diff --git a/tool/net/redbean.c b/tool/net/redbean.c index 2ce4ac87d..b96e751eb 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -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}, //