Skip to content

Commit 0fc70f9

Browse files
committed
80 limit
1 parent ebe1006 commit 0fc70f9

4 files changed

+42
-31
lines changed

src/ngx_http_lua_balancer_ssl_session_fetchby.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ ngx_http_lua_balancer_ssl_sess_fetch(ngx_peer_connection_t *pc, void *data)
7373
ngx_http_lua_srv_conf_t *lscf;
7474
ngx_http_lua_balancer_peer_data_t *bp = data;
7575

76-
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0, "balancer ssl session fetch");
76+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0,
77+
"balancer ssl session fetch");
7778

7879
lscf = bp->conf;
7980

@@ -128,8 +129,8 @@ ngx_http_lua_balancer_ssl_sess_fetch(ngx_peer_connection_t *pc, void *data)
128129

129130

130131
char *
131-
ngx_http_lua_balancer_ssl_sess_fetch_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd,
132-
void *conf)
132+
ngx_http_lua_balancer_ssl_sess_fetch_by_lua_block(ngx_conf_t *cf,
133+
ngx_command_t *cmd, void *conf)
133134
{
134135
char *rv;
135136
ngx_conf_t save;
@@ -168,7 +169,8 @@ ngx_http_lua_balancer_ssl_sess_fetch_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
168169

169170
value = cf->args->elts;
170171

171-
lscf->balancer.ssl_sess_fetch_handler = (ngx_http_lua_srv_conf_handler_pt) cmd->post;
172+
lscf->balancer.ssl_sess_fetch_handler =
173+
(ngx_http_lua_srv_conf_handler_pt) cmd->post;
172174

173175
if (cmd->post == ngx_http_lua_balancer_ssl_sess_fetch_handler_file) {
174176
/* Lua code in an external file */
@@ -215,7 +217,8 @@ ngx_http_lua_balancer_ssl_sess_fetch_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
215217

216218

217219
static ngx_int_t
218-
ngx_http_lua_balancer_ssl_sess_fetch_by_chunk(lua_State *L, ngx_http_request_t *r)
220+
ngx_http_lua_balancer_ssl_sess_fetch_by_chunk(lua_State *L,
221+
ngx_http_request_t *r)
219222
{
220223
u_char *err_msg;
221224
size_t len;
@@ -254,7 +257,8 @@ ngx_http_lua_balancer_ssl_sess_fetch_by_chunk(lua_State *L, ngx_http_request_t *
254257
}
255258

256259
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
257-
"failed to run balancer_ssl_session_fetch_by_lua*: %*s", len, err_msg);
260+
"failed to run balancer_ssl_session_fetch_by_lua*: %*s",
261+
len, err_msg);
258262

259263
lua_settop(L, 0); /* clear remaining elems on stack */
260264

src/ngx_http_lua_balancer_ssl_session_fetchby.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@
1010

1111
#include "ngx_http_lua_common.h"
1212

13-
ngx_int_t ngx_http_lua_balancer_ssl_sess_fetch(ngx_peer_connection_t *pc, void *data);
13+
ngx_int_t ngx_http_lua_balancer_ssl_sess_fetch(ngx_peer_connection_t *pc,
14+
void *data);
1415

15-
ngx_int_t ngx_http_lua_balancer_ssl_sess_fetch_handler_inline(ngx_http_request_t *r,
16-
ngx_http_lua_srv_conf_t *lscf, lua_State *L);
16+
ngx_int_t ngx_http_lua_balancer_ssl_sess_fetch_handler_inline(
17+
ngx_http_request_t *r, ngx_http_lua_srv_conf_t *lscf, lua_State *L);
1718

18-
ngx_int_t ngx_http_lua_balancer_ssl_sess_fetch_handler_file(ngx_http_request_t *r,
19-
ngx_http_lua_srv_conf_t *lscf, lua_State *L);
19+
ngx_int_t ngx_http_lua_balancer_ssl_sess_fetch_handler_file(
20+
ngx_http_request_t *r, ngx_http_lua_srv_conf_t *lscf, lua_State *L);
2021

21-
char *ngx_http_lua_balancer_ssl_sess_fetch_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
22-
void *conf);
22+
char *ngx_http_lua_balancer_ssl_sess_fetch_by_lua(ngx_conf_t *cf,
23+
ngx_command_t *cmd, void *conf);
2324

24-
char *ngx_http_lua_balancer_ssl_sess_fetch_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd,
25-
void *conf);
25+
char *ngx_http_lua_balancer_ssl_sess_fetch_by_lua_block(ngx_conf_t *cf,
26+
ngx_command_t *cmd, void *conf);
2627

2728
#endif /* _NGX_HTTP_LUA_BALANCER_SSL_SESSION_FETCHBY_H_INCLUDED_ */

src/ngx_http_lua_balancer_ssl_session_storeby.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ ngx_http_lua_balancer_ssl_sess_store(ngx_peer_connection_t *pc, void *data)
7474
ngx_http_lua_srv_conf_t *lscf;
7575
ngx_http_lua_balancer_peer_data_t *bp = data;
7676

77-
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0, "balancer ssl session store");
77+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0,
78+
"balancer ssl session store");
7879

7980
lscf = bp->conf;
8081

@@ -129,8 +130,8 @@ ngx_http_lua_balancer_ssl_sess_store(ngx_peer_connection_t *pc, void *data)
129130

130131

131132
char *
132-
ngx_http_lua_balancer_ssl_sess_store_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd,
133-
void *conf)
133+
ngx_http_lua_balancer_ssl_sess_store_by_lua_block(ngx_conf_t *cf,
134+
ngx_command_t *cmd, void *conf)
134135
{
135136
char *rv;
136137
ngx_conf_t save;
@@ -169,7 +170,8 @@ ngx_http_lua_balancer_ssl_sess_store_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
169170

170171
value = cf->args->elts;
171172

172-
lscf->balancer.ssl_sess_store_handler = (ngx_http_lua_srv_conf_handler_pt) cmd->post;
173+
lscf->balancer.ssl_sess_store_handler =
174+
(ngx_http_lua_srv_conf_handler_pt) cmd->post;
173175

174176
if (cmd->post == ngx_http_lua_balancer_ssl_sess_store_handler_file) {
175177
/* Lua code in an external file */
@@ -216,7 +218,8 @@ ngx_http_lua_balancer_ssl_sess_store_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
216218

217219

218220
static ngx_int_t
219-
ngx_http_lua_balancer_ssl_sess_store_by_chunk(lua_State *L, ngx_http_request_t *r)
221+
ngx_http_lua_balancer_ssl_sess_store_by_chunk(lua_State *L,
222+
ngx_http_request_t *r)
220223
{
221224
u_char *err_msg;
222225
size_t len;
@@ -255,7 +258,8 @@ ngx_http_lua_balancer_ssl_sess_store_by_chunk(lua_State *L, ngx_http_request_t *
255258
}
256259

257260
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
258-
"failed to run balancer_ssl_session_store_by_lua*: %*s", len, err_msg);
261+
"failed to run balancer_ssl_session_store_by_lua*: %*s",
262+
len, err_msg);
259263

260264
lua_settop(L, 0); /* clear remaining elems on stack */
261265

@@ -290,7 +294,8 @@ ngx_http_lua_ffi_ssl_set_upstream_session(ngx_http_request_t *r, void *session,
290294

291295

292296
int
293-
ngx_http_lua_ffi_ssl_get_upstream_session(ngx_http_request_t *r, void **session, char **err)
297+
ngx_http_lua_ffi_ssl_get_upstream_session(ngx_http_request_t *r,
298+
void **session, char **err)
294299
{
295300
ngx_ssl_session_t *ssl_session;
296301

src/ngx_http_lua_balancer_ssl_session_storeby.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@
1010

1111
#include "ngx_http_lua_common.h"
1212

13-
void ngx_http_lua_balancer_ssl_sess_store(ngx_peer_connection_t *pc, void *data);
13+
void ngx_http_lua_balancer_ssl_sess_store(ngx_peer_connection_t *pc,
14+
void *data);
1415

15-
ngx_int_t ngx_http_lua_balancer_ssl_sess_store_handler_inline(ngx_http_request_t *r,
16-
ngx_http_lua_srv_conf_t *lscf, lua_State *L);
16+
ngx_int_t ngx_http_lua_balancer_ssl_sess_store_handler_inline(
17+
ngx_http_request_t *r, ngx_http_lua_srv_conf_t *lscf, lua_State *L);
1718

18-
ngx_int_t ngx_http_lua_balancer_ssl_sess_store_handler_file(ngx_http_request_t *r,
19-
ngx_http_lua_srv_conf_t *lscf, lua_State *L);
19+
ngx_int_t ngx_http_lua_balancer_ssl_sess_store_handler_file(
20+
ngx_http_request_t *r, ngx_http_lua_srv_conf_t *lscf, lua_State *L);
2021

21-
char *ngx_http_lua_balancer_ssl_sess_store_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
22-
void *conf);
22+
char *ngx_http_lua_balancer_ssl_sess_store_by_lua(ngx_conf_t *cf,
23+
ngx_command_t *cmd, void *conf);
2324

24-
char *ngx_http_lua_balancer_ssl_sess_store_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd,
25-
void *conf);
25+
char *ngx_http_lua_balancer_ssl_sess_store_by_lua_block(ngx_conf_t *cf,
26+
ngx_command_t *cmd, void *conf);
2627

2728
#endif /* _NGX_HTTP_LUA_BALANCER_SSL_SESSION_STOREBY_H_INCLUDED_ */

0 commit comments

Comments
 (0)