<div class="gmail_quote">On Thu, Dec 3, 2009 at 1:21 PM, Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru">igor@sysoev.ru</a>></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>
> Can someone explain (or point me to some documentation on) the meaning of<br>
> 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'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>
> I'm writing a body filter, and I'm trying to<br>
> figure out whether the presence of a non-null shadow in a buffer means that<br>
> 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'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>