5 messages in ru.sysoev.nginx[dev] how to read client body data
FromSent OnAttachments
Manlio PerilloAug 21, 2007 1:50 pm 
Manlio PerilloAug 21, 2007 2:13 pm 
Igor SysoevAug 21, 2007 9:59 pm 
Igor SysoevAug 21, 2007 10:01 pm 
Manlio PerilloAug 22, 2007 3:47 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[dev] how to read client body dataActions...
From:Manlio Perillo (manl@public.gmane.org)
Date:Aug 21, 2007 1:50:55 pm
List:ru.sysoev.nginx

Hi.

I'm tryng to understand how to read client body data for a request.

Reading the perl module and the dav module I have found these options:

request_body_in_single_buf request_body_in_file_only request_body_in_persistent_file request_body_in_clean_file request_body_file_group_access request_body_file_log_level

What's the meaning of these parameters?

To read the client body data, all I have to do is to set the previous parameters (as I wish) and call ngx_http_read_client_request_body with a "secondary" handler that will receive the request object filled with the necessary data?

Ihis operation is asyncronous, right? This is the reason why you need to call ngx_http_finalize_request from the "secondary" handler.

In the end, all I need is: 1) if the request body length is <= client_body_buffer_size, store the body in *only one* memory buffer (that is, all the data stored in a contiguos memory block)

2) if the request body length is > client_body_buffer_size, store *all the* body in a temporary file.

Is 1) possible?