chunk encoded client body

Manlio Perillo manlio_perillo at
Fri Sep 28 13:58:07 MSD 2007

Igor Sysoev ha scritto:
> On Wed, Sep 26, 2007 at 04:31:24PM +0200, Manlio Perillo wrote:
>> Does nginx supports chunk encoded client body?
> No. It will be supported only when I will implement client body filter
> chain (I do not want to do partial solution right now).
> The client body filter chain allows to implement
> *) upload progress bar filter
> *) dechunk body filter
> *) POST filter to parse POST body and save POSTed files

Great, saving POSTed files is one of the feature I need, since it cannot 
be done efficiently by a WSGI application!

It would be nice if nginx can "convert" multipart/form-data client body 
data to application/x-www-form-urlencoded, saving POSTed file.

As an example (taken from the HTML 4.01 spec:

  <FORM action=""
    What is your name? <INPUT type="text" name="submit-name"><BR>
    What files are you sending? <INPUT type="file" name="files"><BR>
    <INPUT type="submit" value="Send"> <INPUT type="reset">

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

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

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

    ... contents of file1.txt ...

will be converted to:

    Content-Type: application/x-www-form-urlencoded


and the content of file1 will be saved in /temp_path/{prefix}/file1.txt

Additionally, the prefix can be build using values supplied in the form 

> *) default filter to save body to file or memory

Thanks and regards   Manlio Perillo

More information about the nginx mailing list