Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
HTTP 1.1 chunked-encoding request body support for Nginx
C Perl Ragel in Ruby Host Shell

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
misc
src
test
util
.gitignore
README
config

README

This module attempts to add HTTP 1.1 chunked transfer
encoding support for request bodies to nginx 0.8.x and
0.7.x without patching nginx.

Status

Mostly working now except:

1. You will see the harmless "zero size buf in output"
   alert in your error log.

2. "client_body_in_single_buffer on" may *not* be obeyed
   for short contents and fast network.

3. "client_body_in_file_only on" may *not* be obeyed
   for short contents and fast network.

These will be fixed in future versions.

Usage:

    chunkin on;
    location /foo {
        # your normal config goes here...
    }

That is, the only directive provided by this module is
"chunkin".

To build this module with your nginx:

    $ wget 'http://sysoev.ru/nginx/nginx-0.8.24.tar.gz'
    $ tar -xzvf nginx-0.8.24.tar.gz
    $ cd nginx-0.8.24/

    # Here we assume you would install you nginx under /opt/nginx/.
    $ ./configure --prefix=/opt/nginx \
        --add-module=/path/to/chunkin-nginx-module

    $ make -j2
    $ make install

The chunked parser is actually generated by Ragel. If you want to
regenerate the parser's C file, i.e., src/chunked_parser.c, use
the following command:

    $ ragel -G2 src/chunked_parser.rl

Originally spiked by the discussion in this nginx mailing list
thread:

  http://forum.nginx.org/read.php?2,4453,15135

Something went wrong with that request. Please try again.