Skip to content

Commit 69a4afd

Browse files
committed
doc: document pool_only_after_response
1 parent 7a4c47b commit 69a4afd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ The options table has the following fields:
171171
* `pool`: custom connection pool name. Option as per [OpenResty docs](https://github.com/openresty/lua-nginx-module#tcpsockconnect), except that the default will become a pool name constructed using the SSL / proxy properties, which is important for safe connection reuse. When in doubt, leave it blank!
172172
* `pool_size`: option as per [OpenResty docs](https://github.com/openresty/lua-nginx-module#tcpsockconnect)
173173
* `backlog`: option as per [OpenResty docs](https://github.com/openresty/lua-nginx-module#tcpsockconnect)
174+
* `pool_only_after_response`: when enabled, set_keepalive() verifies http response fully read before pooling. Default is `false`
174175
* `proxy_opts`: sub-table, defaults to the global proxy options set, see [set\_proxy\_options](#set_proxy_options).
175176
* `ssl_verify`: option as per [OpenResty docs](https://github.com/openresty/lua-nginx-module#tcpsocksslhandshake), except that it defaults to `true`.
176177
* `ssl_server_name`: option as per [OpenResty docs](https://github.com/openresty/lua-nginx-module#tcpsocksslhandshake)

Diff for: lib/resty/http_connect.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ client:connect {
2020
pool = nil, -- connection pool name, leave blank! this function knows best!
2121
pool_size = nil, -- options as per: https://github.com/openresty/lua-nginx-module#tcpsockconnect
2222
backlog = nil,
23-
pool_only_after_response = false, -- only allow set_keepalive() after http response fully read
23+
pool_only_after_response = false, -- set_keepalive() verifies http response fully read before pooling
2424
2525
-- ssl options as per: https://github.com/openresty/lua-nginx-module#tcpsocksslhandshake
2626
ssl_server_name = nil,

0 commit comments

Comments
 (0)