Sorry about that, inadvertently hit send...<br><br><div>I am modifying an existing working filter module. I am issuing a subrequest, which is to a URI, or to a static local file (via a location in the config); I'd like to determine the size of the response that I'm getting back from the subrequest.<div>
<br></div><div>In the subrequest's header filter, I'm doing this to find out the response size:</div><div><div>if (r->upstream) {</div><div> response_size = r->upstream->headers_in.content_length_n;<span class="HOEnZb"><font color="#888888"><br>
</font></span></div><div> ...</div><div>}</div><div><br></div><div>For the subrequests that result in the static file being streamed from disk, r->upstream is NULL. </div><div>What's the right nginx way to determine in my filter what the size of the 'body' part of the subrequest response is going to be?</div>
<div><br></div><div>Thanks!</div><div><br></div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div><div class="gmail_quote">On Mon, Mar 19, 2012 at 9:31 PM, Brian Moran <span dir="ltr"><<a href="mailto:bmoran@onehub.com">bmoran@onehub.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><span class="HOEnZb"><font color="#888888">-- <br>e: <a href="mailto:bmoran@onehub.com" target="_blank">bmoran@onehub.com</a><br>
p: <a href="tel:%2B1%20206%20390%204376" value="+12063904376" target="_blank">+1 206 390 4376</a><br><br>Onehub, Inc.<br><a href="http://www.onehub.com" target="_blank">www.onehub.com</a><br><br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>e: <a href="mailto:bmoran@onehub.com" target="_blank">bmoran@onehub.com</a><br>p: +1 206 390 4376<br><br>Onehub, Inc.<br><a href="http://www.onehub.com" target="_blank">www.onehub.com</a><br>
<br>
</div>