Hi, my colleague found this interesting comment in nginx's source code:<div><br></div><div><div>Â Â Â Â Â Â if (p->upstream_done) {</div><div>Â Â Â Â Â Â Â Â ngx_http_file_cache_update(r, u->pipe->temp_file);</div>
<div><br></div><div>Â Â Â Â Â Â } else if (p->upstream_eof) {</div><div><br></div><div>Â <b> Â Â Â Â Â Â Â /* TODO: check length & update cache */</b></div><div><br></div><div>Â Â Â Â Â Â Â Â ngx_http_file_cache_update(r, u->pipe->temp_file);</div>
<div><br></div><div>Â Â Â Â Â Â } else if (p->upstream_error) {</div><div>Â Â Â Â Â Â Â Â ngx_http_file_cache_free(r->cache, u->pipe->temp_file);</div><div>Â Â Â Â Â Â }</div><div><br></div><div>next time shall I ask a question, I'd better to do this first: <b>grep -ri 'TODO: ' *</b></div>
<br><div class="gmail_quote">On Wed, Jun 8, 2011 at 4:31 PM, Piotr Sikora <span dir="ltr"><<a href="mailto:piotr.sikora@frickle.com">piotr.sikora@frickle.com</a>></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 < <a href="mailto:piotr.sikora@frickle.com" target="_blank">piotr.sikora@frickle.com</a> ><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>