# Chunk encoded client body

**URL:** <https://www.ruby-forum.com/t/chunk-encoded-client-body/115585>\
**Category:** NGINX\
**Created:** [September 26, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/chunk-encoded-client-body/115585 "2007-09-26T16:45:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manlio\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@Manlio\_P](https://www.ruby-forum.com/u/Manlio_P)\
**Post date:** [September 26, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/chunk-encoded-client-body/115585/1 "2007-09-26T16:45:10Z")

</div>

Hi.

Does nginx supports chunk encoded client body?

Thanks Manlio P.

---

<div class="post-metadata">

**Author:** ![Manlio\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@Manlio\_P](https://www.ruby-forum.com/u/Manlio_P)\
**Post date:** [September 28, 2007, 11:43am UTC](https://www.ruby-forum.com/t/chunk-encoded-client-body/115585/2 "2007-09-28T11:43:42Z")

</div>

On Wed, Sep 26, 2007 at 04:31:24PM +0200, Manlio P. 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  
\*) default filter to save body to file or memory

---

<div class="post-metadata">

**Author:** ![Manlio\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@Manlio\_P](https://www.ruby-forum.com/u/Manlio_P)\
**Post date:** [September 28, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/chunk-encoded-client-body/115585/3 "2007-09-28T12:08:18Z")

</div>

Igor S. ha scritto:

> \*) 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:

What is your name?   
 What files are you sending?

```
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--

```

will be converted to:

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

submit-name=Larry&files=file1.txt

```

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  
submission.

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

Thanks and regards Manlio P.
