Welcome! Log In Create A New Profile

Advanced

Re: limit_rate_after support variables

Miroslav Novy
November 21, 2018 06:12AM
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@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ý
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

limit_rate_after support variables

Miroslav Novy 847 August 14, 2018 04:24AM

Re: limit_rate_after support variables

ru@nginx.com 530 August 27, 2018 07:30AM

Re: limit_rate_after support variables

Miroslav Novy 497 August 27, 2018 09:38AM

Re: limit_rate_after support variables

ru@nginx.com 521 August 27, 2018 12:02PM

Re: limit_rate_after support variables

Miroslav Novy 431 August 28, 2018 03:24AM

Re: limit_rate_after support variables

ru@nginx.com 544 August 29, 2018 07:44AM

Re: limit_rate_after support variables

Miroslav Novy 466 August 30, 2018 03:02AM

Re: limit_rate_after support variables

Miroslav Novy 396 October 17, 2018 06:50AM

Re: limit_rate_after support variables

ru@nginx.com 476 November 20, 2018 09:12AM

Re: limit_rate_after support variables

Miroslav Novy 360 November 21, 2018 06:12AM

Re: limit_rate_after support variables

Miroslav Novy 397 November 21, 2018 09:52AM

Re: limit_rate_after support variables

ru@nginx.com 535 December 06, 2018 09:46AM

Re: limit_rate_after support variables

Miroslav Novy 355 December 10, 2018 08:32AM

Re: limit_rate_after support variables

Miroslav Nový 336 February 25, 2019 06:08AM

Re: limit_rate_after support variables

ru@nginx.com 468 February 26, 2019 03:00AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready