Skip to content

Commit 906c3e1

Browse files
committed
Fixed proxy.
1 parent 1ce17f6 commit 906c3e1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/lpm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,9 +1848,8 @@ static int lpm_extract(lua_State* L) {
18481848
int proxy_port = context->port;
18491849
if (lua_type(L, 7) == LUA_TSTRING)
18501850
proxy_hostname = luaL_checkstring(L, 7);
1851-
if (lua_gettop(L) >= 8)
1851+
if (lua_type(L, 8) == LUA_TSTRING || lua_type(L, 8) == LUA_TNUMBER)
18521852
proxy_port = lua_tointeger(L, 8);
1853-
18541853
if (strcmp(protocol, "https") == 0) {
18551854
const char port[12];
18561855
snprintf(port, sizeof(port), "%d", proxy_port);

0 commit comments

Comments
 (0)