Skip to content

Commit b0fbce3

Browse files
committed
bugfix: sslhandshake() accepts up to 5 arguments now (including the object itself).
1 parent 256a59c commit b0fbce3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ngx_http_lua_socket_tcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,8 @@ ngx_http_lua_socket_tcp_sslhandshake(lua_State *L)
11811181
/* Lua function arguments: self [,session] [,host] [,verify] */
11821182

11831183
n = lua_gettop(L);
1184-
if (n < 1 || n > 4) {
1185-
return luaL_error(L, "ngx.socket connect: expecting 1 ~ 4 "
1184+
if (n < 1 || n > 5) {
1185+
return luaL_error(L, "ngx.socket connect: expecting 1 ~ 5 "
11861186
"arguments (including the object), but seen %d", n);
11871187
}
11881188

t/129-ssl-socket.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,7 @@ SSL reused session
26142614
GET /t
26152615
--- ignore_response
26162616
--- error_log eval
2617-
qr/\[error\] .* ngx.socket connect: expecting 1 ~ 4 arguments \(including the object\), but seen 0/
2617+
qr/\[error\] .* ngx.socket connect: expecting 1 ~ 5 arguments \(including the object\), but seen 0/
26182618
--- no_error_log
26192619
[alert]
26202620
--- timeout: 5

0 commit comments

Comments
 (0)