sending data in "chunks"

Manlio Perillo manlio_perillo at
Mon Sep 17 00:51:10 MSD 2007

Igor Sysoev ha scritto:
> [...]
> If you have got all your data ready you may send them at once in one chain.
> But if you are getting then gradually, then after NGX_AGAIN you should
> set event handlers and timer and return control to nginx.

As suggested, I have accumulate all the data in a buffer chain.
The data in my test is about 3.7 MB (an mp3) and, finally, the whole 
content is sent to the client.

However ngx_http_output_filter still returns NGX_AGAIN, and I have noted 
that Firefox when loading the data does not see the end of the stream.

P.S. I can just copy the data in a temporary file, if the size
      is too big"

Thanks and regards  Manlio Perillo

More information about the nginx mailing list