Why body filter not work

Hi.
I just copy the code from Evan M.'s body filter.
Emiller’s Guide to Nginx Module Development – Evan Miller,
however, In my browser I could not see inserted string ()

And I found that request header.

Transfer-Encoding: chunked

Is anything that I am wrong. Thanks.


Rejoice,I Desire!

Hello!

On Wed, Aug 06, 2014 at 02:58:16PM +0800, Jerry OELoo wrote:

Hi.
I just copy the code from Evan M.'s body filter.
Emiller’s Guide to Nginx Module Development – Evan Miller,
however, In my browser I could not see inserted string ()

The chapter in question doesn’t looks correct - it tries to modify
chain links passed to the filter (that is, chain links that belong
to some other module), which is wrong thing to do. Instead, one
should allocate new chain links, and construct a new chain with
them.

In any case though it may be better idea to test with something
more suitable for testing than browser. E.g., telnet or netcat
may be better.

And I found that request header.

Transfer-Encoding: chunked

Is anything that I am wrong. Thanks.

The “Transfer-Encoding: chunked” header is correct as long as
response size isn’t known in advance. See here for details:


Maxim D.
http://nginx.org/