ngx_http_proxy_connect_module
ngx_http_proxy_connect_module copied to clipboard
Can somebody help me to confirm
In the code of function ngx_http_proxy_connect_tunnel() :
if (downstream->read->active && !downstream->read->ready) {
if (!from_upstream) {
ngx_add_timer(downstream->read, clcf->client_body_timeout);------>"Why use clcf->client_body_timeout but not clcf->read_timeout."
Is this a bug?
I found the ngx_http_core_module only have send_timeout but no read_timeout option.
Hi @scutkim
We know that tunnel proxying has two direction: upstream and downstream. For upstream, this module provides proxy_connect_{read|send|connect}_timeout to control timeout between nginx and upstream.
For downstream, this module does not provide some directives, it just reuses nginx original directive client_body_timeout. It's ok, because nginx does not run client-body-handling logic on proxy-tunnel connection. But we can provide a new directive for this module to control timeout for downstream, which is more elegant and not confusing.
Added this problem to TODO list: TODO: added directive to control downstream timeout.
hi this issue has been fixed , and we use only one directive proxy_connect_data_timeout to control it. More details and version : see v0.04 or latest master
With this new updating , you will not need use send_timeout directive to control proxy_connect module.