Yes. It should work for any request method.<br><br><div class="gmail_quote">2013/1/16 Pasi Kärkkäinen <span dir="ltr"><<a href="mailto:pasik@iki.fi" target="_blank">pasik@iki.fi</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Sun, Jan 13, 2013 at 08:22:17PM +0800, ?????? wrote:<br>
> This patch should work between nginx-1.2.6 and nginx-1.3.8.<br>
> The documentation is here:<br>
<br>
> ## client_body_postpone_sending ##<br>
> Syntax: **client_body_postpone_sending** `size`<br>
> Default: 64k<br>
> Context: `http, server, location`<br>
> If you specify the `proxy_request_buffering` or<br>
> `fastcgi_request_buffering` to be off, Nginx will send the body to backend<br>
> when it receives more than `size` data or the whole request body has been<br>
> received. It could save the connection and reduce the IO number with<br>
> backend.<br>
><br>
> ## proxy_request_buffering ##<br>
> Syntax: **proxy_request_buffering** `on | off`<br>
> Default: `on`<br>
> Context: `http, server, location`<br>
> Specify the request body will be buffered to the disk or not. If it's off,<br>
> the request body will be stored in memory and sent to backend after Nginx<br>
> receives more than `client_body_postpone_sending` data. It could save the<br>
> disk IO with large request body.<br>
><br>
><br>
> Note that, if you specify it to be off, the nginx retry mechanism<br>
> with unsuccessful response will be broken after you sent part of the<br>
> request to backend. It will just return 500 when it encounters such<br>
> unsuccessful response. This directive also breaks these variables:<br>
> $request_body, $request_body_file. You should not use these variables any<br>
> more while their values are undefined.<br>
><br>
<br>
</div></div>Hello,<br>
<br>
This patch sounds exactly like what I need aswell!<br>
I assume it works for both POST and PUT requests?<br>
<br>
Thanks,<br>
<br>
-- Pasi<br>
<div class="im"><br>
<br>
> Hello!<br>
> @yaoweibin<br>
><br>
> If you are eager for this feature, you could try my<br>
</div>> patch: [2]<a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a>. This patch has<br>
<div class="im">> been running in our production servers.<br>
><br>
> what's the nginx version your patch based on?<br>
> Thanks!<br>
</div><div class="im">> On Fri, Jan 11, 2013 at 5:17 PM, Ҋΰ±ó <[3]<a href="mailto:yaoweibin@gmail.com">yaoweibin@gmail.com</a>> wrote:<br>
><br>
> I know nginx team are working on it. You can wait for it.<br>
> If you are eager for this feature, you could try my<br>
</div>> patch: [4]<a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a>. This patch has<br>
<div class="im">> been running in our production servers.<br>
><br>
</div>> 2013/1/11 li zJay <[5]<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a>><br>
<div class="im">><br>
> Hello!<br>
> is it possible that nginx will not buffer the client body before<br>
> handle the request to upstream?<br>
> we want to use nginx as a reverse proxy to upload very very big file<br>
> to the upstream, but the default behavior of nginx is to save the<br>
> whole request to the local disk first before handle it to the<br>
> upstream, which make the upstream impossible to process the file on<br>
> the fly when the file is uploading, results in much high request<br>
> latency and server-side resource consumption.<br>
> Thanks!<br>
> _______________________________________________<br>
> nginx mailing list<br>
</div>> [6]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> [7]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<div class="im">><br>
> --<br>
> Weibin Yao<br>
> Developer @ Server Platform Team of Taobao<br>
> _______________________________________________<br>
> nginx mailing list<br>
</div>> [8]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> [9]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> [10]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> [11]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<div class="im">><br>
> --<br>
> Weibin Yao<br>
> Developer @ Server Platform Team of Taobao<br>
><br>
</div>> References<br>
><br>
> Visible links<br>
> 1. mailto:<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a><br>
> 2. <a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> 3. mailto:<a href="mailto:yaoweibin@gmail.com">yaoweibin@gmail.com</a><br>
> 4. <a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> 5. mailto:<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a><br>
> 6. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> 7. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> 8. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> 9. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> 10. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> 11. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<div class="im HOEnZb"><br>
<br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Weibin Yao<br>Developer @ Server Platform Team of Taobao