Thanks, Yao. Is there a way to postpone the header's sending? btw: So content-lenght should be known before Nginx invokes the body filter, right? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,99290,99305#msg-99305