<div class="gmail_quote">On Thu, Dec 3, 2009 at 1:21 PM, Igor Sysoev <span dir="ltr">&lt;<a href="mailto:igor@sysoev.ru">igor@sysoev.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Thu, Dec 03, 2009 at 12:08:29PM -0800, Brian Pane wrote:<br>
<br>
&gt; Can someone explain (or point me to some documentation on) the meaning of<br>
&gt; the shadow field in ngx_buf_t?<br>
<br>
</div>This is ancient thing and I do not like it. It was initially introduced<br>
in code used by proxy and fastcgi to bookkeeping buf&#39;s saved in temporary<br>
files. But now I think this is overengineered thing. Then it also used<br>
to bookkeeping in SSI filter. Probably, it should rwritten, too.<br>
<div class="im"><br>
&gt; I&#39;m writing a body filter, and I&#39;m trying to<br>
&gt; figure out whether the presence of a non-null shadow in a buffer means that<br>
&gt; I need to do any special processing.<br>
<br>
</div>No.</blockquote><div><br></div><div>Thanks.  A follow-up question: When a body filter is processing buffers that</div><div>were produced by the proxy module (i.e., buffers containing an HTTP response</div><div>from a back-end server), is it safe to discard those buffers?</div>

<div><br></div><div>As a trivial example, imagine that you have a body filter that simply</div><div>returns NGX_OK, in order to prevent the response body from being</div><div>sent to the client. Is that a safe thing to do?  Or is it necessary to</div>

<div>pass the buffers through to the standard filters?  It&#39;s not clear to me</div><div>whether anything in the standard filter chain needs to see the buffers</div><div>containing the upstream response in order to do cleanup or flow control.</div>

<div><br></div><div>Thanks,</div><div>-Brian</div></div>