15 messages in ru.sysoev.nginxRe: sending data in "chunks"
FromSent OnAttachments
Manlio PerilloSep 16, 2007 10:36 am 
Igor SysoevSep 16, 2007 10:43 am 
Manlio PerilloSep 16, 2007 11:07 am 
Igor SysoevSep 16, 2007 11:13 am 
Manlio PerilloSep 16, 2007 11:35 am 
Igor SysoevSep 16, 2007 11:43 am 
Adrian Perez de CastroSep 16, 2007 1:35 pm 
Manlio PerilloSep 16, 2007 1:50 pm 
Igor SysoevSep 18, 2007 11:29 am 
Igor SysoevSep 18, 2007 11:32 am 
Manlio PerilloSep 18, 2007 12:16 pm 
Igor SysoevSep 18, 2007 12:30 pm 
Manlio PerilloSep 18, 2007 12:44 pm 
Adrian Perez de CastroSep 19, 2007 7:59 am 
Manlio PerilloSep 21, 2007 1:02 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: sending data in "chunks"Actions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Sep 18, 2007 11:32:07 am
List:ru.sysoev.nginx

On Sun, Sep 16, 2007 at 10:51:10PM +0200, Manlio Perillo wrote:

Igor Sysoev ha scritto:

[...] It's NGX_AGAIN. 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.

Have you set last_buf in last buf ?