# Ngx\_chunkin v0.20: fixed some memory bugs and added support for chunked PUT

**URL:** <https://www.ruby-forum.com/t/ngx-chunkin-v0-20-fixed-some-memory-bugs-and-added-support-for-chunked-put/192564>\
**Category:** NGINX\
**Created:** [August 2, 2010, 9:47am UTC](https://www.ruby-forum.com/t/ngx-chunkin-v0-20-fixed-some-memory-bugs-and-added-support-for-chunked-put/192564 "2010-08-02T09:47:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![agentzh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4da419/32.png) [@agentzh](https://www.ruby-forum.com/u/agentzh)\
**Post date:** [August 2, 2010, 9:47am UTC](https://www.ruby-forum.com/t/ngx-chunkin-v0-20-fixed-some-memory-bugs-and-added-support-for-chunked-put/192564/1 "2010-08-02T09:47:12Z")

</div>

Hi, folks!

I’ve just pushed a new release (v0.20) for my ngx\_chunkin module:

```
http://github.com/agentzh/chunkin-nginx-module/tarball/v0.20

```

Here’s the changes included in this version:

```
* fixed a bug that may read incomplete chunked body. thanks Gong

```

Kaihui (¹¨¿ªêÍ).  
\* fixed various memory issues in the implementation which may  
cause nginx processes to crash.  
\* added support for chunked POST requests.  
\* now we always require “error\_page 411 @resume” and no default  
(buggy) magic any more. thanks Gong Kaihui (¹¨¿ªêÍ).

This module adds HTTP 1.1 chunked input support for Nginx without the  
need of patching the Nginx core.

Behind the scene, it registers an access-phase handler that will  
eagerly read and decode incoming request bodies when a  
Transfer-Encoding: chunked header triggers a 411 error page in Nginx.  
For requests that are not in the chunked transfer encoding, this  
module is a “no-op”.

To enable the magic, just turn on the chunkin config option and define  
a custom 411 error\_page using chunkin\_resume, like this:

server {  
chunkin on;

```
error_page 411 = @my_411_error;
location @my_411_error {
    chunkin_resume;
}

...

```

}

See its wiki page for the full documentation:

```
http://wiki.nginx.org/NginxHttpChunkinModule

```

Note that nginx 0.8.41 and 0.7.67 are confirmed to work with this  
version. Nginx releases newer than 0.8.41 will NOT work due to this  
issue:

```
http://forum.nginx.org/read.php?29,103078

```

(There has not been any replies from the nginx author.)

Cheers,  
-agentzh

---

<div class="post-metadata">

**Author:** ![agentzh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4da419/32.png) [@agentzh](https://www.ruby-forum.com/u/agentzh)\
**Post date:** [August 3, 2010, 5:30am UTC](https://www.ruby-forum.com/t/ngx-chunkin-v0-20-fixed-some-memory-bugs-and-added-support-for-chunked-put/192564/2 "2010-08-03T05:30:21Z")

</div>

2010/8/2 agentzh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> I’ve just pushed a new release (v0.20) for my ngx\_chunkin module:
> 
> [http://github.com/agentzh/chunkin-nginx-module/tarball/v0.20](http://github.com/agentzh/chunkin-nginx-module/tarball/v0.20)
> 
> Here’s the changes included in this version:

I’ve just kicked ngx\_chunkin v0.21 out of the door, which applies a  
patch from Gong Kaihui that fixed a small bug:

[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/NginxHttpChunkinModule#v0.21)

[http://github.com/agentzh/chunkin-nginx-module/tarball/v0.21](http://github.com/agentzh/chunkin-nginx-module/tarball/v0.21)

Cheers,  
-agentzh
