Welcome! Log In Create A New Profile

Advanced

Re: ngx_http_read_client_request_body() causing random timeouts

agentzh
May 31, 2011 04:30AM
On Tue, May 31, 2011 at 4:08 PM, Srebrenko Šehić <ssehic@gmail.com> wrote:
>
>    if (r->method != NGX_HTTP_POST) {
>        return NGX_DECLINED;
>    }
>
>    ctx = ngx_palloc(r->pool, sizeof(ngx_http_dummy_post_read_ctx_t));
>

I think you should have used ngx_pcalloc here instead of ngx_palloc so
as to initialize the bytes properly ;) We're using ngx_pcalloc
correctly here in ngx_form_input.

You're recommended to use tools like valgrind memcheck (or gcc's
builtin malloc check) to spot issues like this :)

Cheers,
-agentzh

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

ngx_http_read_client_request_body() causing random timeouts

Srebrenko Šehić 2512 May 31, 2011 04:10AM

Re: ngx_http_read_client_request_body() causing random timeouts

agentzh 961 May 31, 2011 04:30AM

Re: ngx_http_read_client_request_body() causing random timeouts

Srebrenko Šehić 1108 May 31, 2011 04:44AM



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

Online Users

Guests: 243
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