limit_rate_after support variables
Miroslav Novy
miranovy at gmail.com
Wed Nov 21 11:11:10 UTC 2018
Hi Ruslan,
> I've updated my version of the patch series.
Thank you :)
> You can help with the code review and testing, if you like:
Yes, of corse.
The first patch from the series "Added post processing to
ngx_http_set_complex_value_slot()" is ok.
For second patch "Added size_t type support to
ngx_http_set_complex_value_slot()" I prepared fix, becouse
return type of ngx_parse_size is ssize_t. These is my fix
# HG changeset patch
# User Miroslav Nový <miranovy at gmail.com>
# Date 1542796801 0
# Wed Nov 21 10:40:01 2018 +0000
# Node ID 82eed7650622fd780dcd4a86661de7b80b44199c
# Parent 1090756c530aabe5e63882dcbf278b23807568d0
Added size_t type support to ngx_http_set_complex_value_slot() fix
Return type of function ngx_parse_size is ssize_t
diff -r 1090756c530a -r 82eed7650622 src/http/ngx_http_script.c
--- a/src/http/ngx_http_script.c Tue Nov 20 16:53:38 2018 +0300
+++ b/src/http/ngx_http_script.c Wed Nov 21 10:40:01 2018 +0000
@@ -113,7 +113,7 @@
ngx_int_t
ngx_http_complex_value_size(ngx_http_request_t *r,
- ngx_http_complex_value_t *val, ngx_str_t *value, size_t *size)
+ ngx_http_complex_value_t *val, ngx_str_t *value, ssize_t *size)
{
if (val->lengths == NULL) {
*size = val->u.size;
diff -r 1090756c530a -r 82eed7650622 src/http/ngx_http_script.h
--- a/src/http/ngx_http_script.h Tue Nov 20 16:53:38 2018 +0300
+++ b/src/http/ngx_http_script.h Wed Nov 21 10:40:01 2018 +0000
@@ -212,7 +212,7 @@
ngx_int_t ngx_http_complex_value(ngx_http_request_t *r,
ngx_http_complex_value_t *val, ngx_str_t *value);
ngx_int_t ngx_http_complex_value_size(ngx_http_request_t *r,
- ngx_http_complex_value_t *val, ngx_str_t *value, size_t *size);
+ ngx_http_complex_value_t *val, ngx_str_t *value, ssize_t *size);
ngx_int_t ngx_http_compile_complex_value(ngx_http_compile_complex_value_t
*ccv);
char *ngx_http_set_complex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
The last patch "Variables support in limit_rate and limit_rate_after
(ticket #293)." throws warning "using uninitialized variable!. I am
going to make the fix today later.
Best regards
Miroslav Nový
More information about the nginx-devel
mailing list