nginx/ngx-rust

Make Buffer Reuse Possible

Opened this issue · 0 comments

jmccl commented

I would like to reuse buffers as described here.

https://nginx.org/en/docs/dev/development_guide.html#http_body_buffers_reuse

This is currently (I think) not possible as the raw ngx_pool_t is private to ngx::core::Pool, so that ngx_chain_get_free_buf and ngx_chain_update_chains can’t be called.

Possible solutions are:

  • Make the ngx_pool_t public, which I assume you don't want to do.
  • Implement the chain creation / update functions on Pool.
  • Something else?