some questions about the upload module

Manlio Perillo manlio_perillo at libero.it
Tue Sep 9 20:37:44 MSD 2008


Valery Kholodkov ha scritto:
> Manlio Perillo wrote:
>> Valery Kholodkov ha scritto:
>>> "Manlio Perillo" <manlio_perillo at libero.it> wrote:
>>>
>>>>    For the example in the source, how is the request body passed to the
>>>>    PHP application encoded?
>>>
>>> I simply replace r->request_body->bufs with the chain of buffers,
>>> containing new body. The ngx_http_read_client_request_body function
>>> somehow manages to read no data more and fastcgi and proxy modules are
>>> clever enough to serialize those buffers properly.
>>>
>>
>> The data is the same multipart/form-data encoded data, with extra 
>> parameters (like the temporary file path) added in the 
>> content-disposition?
> 
> Yes, the data is the same multipart/form-data, but extra parameters are 
> added as fields.
> 

Can you make an example, using this sample data (from HTML 4.2 spec)?

Content-Type: multipart/form-data; boundary=AaB03x

    --AaB03x
    Content-Disposition: form-data; name="submit-name"

    Larry
    --AaB03x
    Content-Disposition: form-data; name="files"; filename="file1.txt"
    Content-Type: text/plain

    ... contents of file1.txt ...
    --AaB03x--



Thanks  Manlio Perillo





More information about the nginx mailing list