how can i get it all?? please ~~<br><br><div class="gmail_quote">On Mon, Mar 16, 2009 at 10:34 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello!<br>
<div><div></div><div class="h5"><br>
On Mon, Mar 16, 2009 at 10:04:16PM +0800, pf shineyear wrote:<br>
<br>
> hi<br>
><br>
> i try to get a complete proxy content from a body filter like this:<br>
><br>
> struct ngx_chain_s *tmp_in = in;<br>
><br>
> while (tmp_in)<br>
> {<br>
> len = tmp_in->buf->last - tmp_in->buf->pos;<br>
><br>
> if (len <= 0)<br>
> {<br>
> if (tmp_in->next == NULL)break;<br>
><br>
> tmp_in = tmp_in->next;<br>
> continue;<br>
> }<br>
><br>
> // copy the buf to somewhere<br>
><br>
><br>
> if (tmp_in->next == NULL)<br>
> {<br>
> break;<br>
> }<br>
><br>
> tmp_in = tmp_in->next;<br>
><br>
> }<br>
><br>
> if (tmp_in->buf->last_buf)<br>
> {<br>
> //end of the buf<br>
> }<br>
><br>
> i set proxy_buffering off; but when i want to get a more little bigger file<br>
> about 200KB<br>
><br>
> i always got len <= 0 buf , so can u tell me why ? and how to resolve that?<br>
<br>
</div></div>Buffers with (last - pos) <= 0 are prefectly normal, as there is<br>
much more than simple buffers with content in memory. This<br>
include various special buffers and buffers with content in files.<br>
<font color="#888888"><br>
Maxim Dounin<br>
<br>
</font></blockquote></div><br>