Welcome! Log In Create A New Profile

Advanced

ngx_http_read_client_request_body not always being called?

August 15, 2022 04:35PM
(I wanted to post this to the Nginx Development group but it's read only)

I'm developing a module which will receive post data then print out "Done". "Done" will be printed out regardless if it's a "POST" or a "GET". Issue I'm having is ngx_http_read_client_request_body is not always calling my call back, I have to wait a few seconds / resubmit form before it works. Is there a caching issue I'm not aware of? I'm doing this from bash command line, a simple CURL command.

Here is what I have in my "cmd_handler":
{
if (r->method == NGX_HTTP_POST)
ngx_http_read_client_request_body(r, ngx_http_form_read)

ngx_str_set(&r->headers_out.content_type, "text/html")
///....more out data definitions
ngx_http_output_filter(r, out);
ngx_http_finalize(request, r, NGX_DONE)
return NGX_DONE
}

In my ngx_http_form_read, I have the following:
{
#if defined(ngx_version) && nginx_version >= 8011
r->main->count--;
#endif

//form parsing data
// no return, this is a void?

}
Subject Author Posted

ngx_http_read_client_request_body not always being called?

atrocitus August 15, 2022 04:35PM

Re: ngx_http_read_client_request_body not always being called?

Sergey Kandaurov August 16, 2022 10:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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