Hi,
I'm writing an NginX module that generates code, and am trying to work out whether it's possible to generate code in a handler in blocks (e.g. buffers of 4KB) rather than generating the whole output at once.
e.g. something like
if (buf_len < buf_max_len) {
...
} else {
send_buf (...);
}
Can you just call ngx_http_output_filter(r, &out) many times within a handler (or filter), or can you only call it when you've finished generating content?
Also, can Nginx start sending content that's generated before the content length is known? I think this is in HTTP 1.1 isn't it? Is there a special function that's called to do this?
Thanks.