Welcome! Log In Create A New Profile

Advanced

Regarding HTTP chunked Body being stored in temp_file

September 16, 2022 03:32AM
Hi,

In our module code, we are processing the HTTP request body when it is not stored in r->request_body->temp_file.

When I send a 9381 bytes body, NGINX doesn't store the body in temp_file but in the internal buffers. Hence we are able to process the body.

However, when I enable chunked encoding, the same 9381 bytes body, gets stored in the r->request_body->temp_file.

To avoid getting stored in temp_file, I have to increase the client_body_buffer_size to a larger value than the default. In that case, chunked encoded http body is NOT stored in temp_file and we are able to process it.

Is there any reason why the behaviour of client_body_buffer_size is different in case of regular HTTP traffic v/s chunked encoded HTTP traffic? Why do we need a larger buffer size to ensure chunked encoded traffic doesn't get stored in temp_file?

Thanks,
Devashi
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Regarding HTTP chunked Body being stored in temp_file

dtandon September 16, 2022 03:32AM

Re: Regarding HTTP chunked Body being stored in temp_file

Maxim Dounin September 17, 2022 01:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready