On Sat, Dec 5, 2009 at 4:06 PM, Brian Pane <brianp@brianp.net> wrote:
[...]
> Thanks. What is the right thing to do if a body filter consumes
> only part of a buf and sets aside the rest for later?
I ended up using a reference-counting design for this. I "subclassed"
ngx_buf_t by allocating a structure with an ngx_buf_t at the start
(so all the nginx core code thinks it's a normal ngx_buf_t) and extra
fields for a references and counts at the end. It's a bit of a hack,
but it works well.
-Brian
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel