comparison src/http/ngx_http_upstream.c @ 7504:c19ca381b2e6

Variables support in limit_rate and limit_rate_after (ticket #293).
author Ruslan Ermilov <ru@nginx.com>
date Wed, 24 Apr 2019 16:38:54 +0300
parents 608810849b6d
children 319242d2ddc9
comparison
equal deleted inserted replaced
7503:b82162b8496a 7504:c19ca381b2e6
2977 u->read_event_handler = ngx_http_upstream_process_non_buffered_upstream; 2977 u->read_event_handler = ngx_http_upstream_process_non_buffered_upstream;
2978 r->write_event_handler = 2978 r->write_event_handler =
2979 ngx_http_upstream_process_non_buffered_downstream; 2979 ngx_http_upstream_process_non_buffered_downstream;
2980 2980
2981 r->limit_rate = 0; 2981 r->limit_rate = 0;
2982 r->limit_rate_set = 1;
2982 2983
2983 if (u->input_filter_init(u->input_filter_ctx) == NGX_ERROR) { 2984 if (u->input_filter_init(u->input_filter_ctx) == NGX_ERROR) {
2984 ngx_http_upstream_finalize_request(r, u, NGX_ERROR); 2985 ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
2985 return; 2986 return;
2986 } 2987 }
4804 4805
4805 n = ngx_atoi(h->value.data, h->value.len); 4806 n = ngx_atoi(h->value.data, h->value.len);
4806 4807
4807 if (n != NGX_ERROR) { 4808 if (n != NGX_ERROR) {
4808 r->limit_rate = (size_t) n; 4809 r->limit_rate = (size_t) n;
4810 r->limit_rate_set = 1;
4809 } 4811 }
4810 4812
4811 return NGX_OK; 4813 return NGX_OK;
4812 } 4814 }
4813 4815