We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ce17f6 commit 906c3e1Copy full SHA for 906c3e1
1 file changed
src/lpm.c
@@ -1848,9 +1848,8 @@ static int lpm_extract(lua_State* L) {
1848
int proxy_port = context->port;
1849
if (lua_type(L, 7) == LUA_TSTRING)
1850
proxy_hostname = luaL_checkstring(L, 7);
1851
- if (lua_gettop(L) >= 8)
+ if (lua_type(L, 8) == LUA_TSTRING || lua_type(L, 8) == LUA_TNUMBER)
1852
proxy_port = lua_tointeger(L, 8);
1853
-
1854
if (strcmp(protocol, "https") == 0) {
1855
const char port[12];
1856
snprintf(port, sizeof(port), "%d", proxy_port);
0 commit comments