Hi, my colleague found this interesting comment in nginx&#39;s source code:<div><br></div><div><div>            if (p-&gt;upstream_done) {</div><div>                ngx_http_file_cache_update(r, u-&gt;pipe-&gt;temp_file);</div>
<div><br></div><div>            } else if (p-&gt;upstream_eof) {</div><div><br></div><div> <b>               /* TODO: check length &amp; update cache */</b></div><div><br></div><div>                ngx_http_file_cache_update(r, u-&gt;pipe-&gt;temp_file);</div>
<div><br></div><div>            } else if (p-&gt;upstream_error) {</div><div>                ngx_http_file_cache_free(r-&gt;cache, u-&gt;pipe-&gt;temp_file);</div><div>            }</div><div><br></div><div>next time shall I ask a question, I&#39;d better to do this first: <b>grep -ri &#39;TODO: &#39; *</b></div>
<br><div class="gmail_quote">On Wed, Jun 8, 2011 at 4:31 PM, Piotr Sikora <span dir="ltr">&lt;<a href="mailto:piotr.sikora@frickle.com">piotr.sikora@frickle.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
will nginx cache partial response when upstream prematutely close connection?<br>
</blockquote>
<br></div>
Sadly, yes.<br>
<br>
Best regards,<br>
Piotr Sikora &lt; <a href="mailto:piotr.sikora@frickle.com" target="_blank">piotr.sikora@frickle.com</a> &gt;<br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>lei yang<br>
</div>