Bugfix: r->limit_rate does't work if limit_rate_set variable is not set

nginx-patch: https://hg.nginx.org/nginx/rev/c19ca381b2e6\?revcount\=480
This commit is contained in:
yefei.dyf
2022-10-08 09:43:40 +08:00
committed by duyefei
parent 5e7e8f9be9
commit 2fb7a6aef0
2 changed files with 2 additions and 0 deletions

View File

@@ -1131,6 +1131,7 @@ ngx_http_tfs_send_response(ngx_http_request_t *r, ngx_http_tfs_t *t)
r->write_event_handler = ngx_http_tfs_process_non_buffered_downstream;
r->limit_rate = 0;
r->limit_rate_set = 1;
if (clcf->tcp_nodelay && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET) {
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "tcp_nodelay");

View File

@@ -62,6 +62,7 @@ ngx_http_multi_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t
ngx_http_upstream_process_non_buffered_downstream;
r->limit_rate = 0;
r->limit_rate_set = 1;
if (u->input_filter_init(u->input_filter_ctx) == NGX_ERROR) {
ngx_http_upstream_finalize_request(r, u, NGX_ERROR);