ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
{
off_t size, sent, nsent, limit;
- ngx_uint_t last, flush;
+ ngx_uint_t last, flush, sync;
ngx_msec_t delay;
ngx_chain_t *cl, *ln, **ll, *chain;
ngx_connection_t *c;
size = 0;
flush = 0;
+ sync = 0;
last = 0;
ll = &r->out;
flush = 1;
}
+ if (cl->buf->sync) {
+ sync = 1;
+ }
+
if (cl->buf->last_buf) {
last = 1;
}
flush = 1;
}
+ if (cl->buf->sync) {
+ sync = 1;
+ }
+
if (cl->buf->last_buf) {
last = 1;
}
&& !(c->buffered & NGX_LOWLEVEL_BUFFERED)
&& !(last && c->need_last_buf))
{
- if (last || flush) {
+ if (last || flush || sync) {
for (cl = r->out; cl; /* void */) {
ln = cl;
cl = cl->next;