Hi all,
What is the proper way to return an empty chunk for a middle sub-request when chunking encoding is enabled for a NGINX filter?
Suppose a website is encoded into multiple chunks such that our http header/body filter is invoked like this:
Sub-request 1: static ngx_int_t HeaderFilter(ngx_http_request_t *r)
Sub-request 1: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
Sub-request 2: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
Sub-request 3: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
Sub-request 4: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
If we want Sub-request 2 to return nothing (e.g: We only want to store the input chain of Sub-request 2 to use together during sub-request 3), then what do we return as the output at the end of serving Sub-request 2?
Many thanks!
What is the proper way to return an empty chunk for a middle sub-request when chunking encoding is enabled for a NGINX filter?
Suppose a website is encoded into multiple chunks such that our http header/body filter is invoked like this:
Sub-request 1: static ngx_int_t HeaderFilter(ngx_http_request_t *r)
Sub-request 1: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
Sub-request 2: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
Sub-request 3: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
Sub-request 4: static ngx_int_t BodyFilter(ngx_http_request_t *r, ngx_chain_t *in)
If we want Sub-request 2 to return nothing (e.g: We only want to store the input chain of Sub-request 2 to use together during sub-request 3), then what do we return as the output at the end of serving Sub-request 2?
Many thanks!