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">&lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;</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>
&gt; hi<br>
&gt;<br>
&gt; i try to get a complete proxy content  from a body filter like this:<br>
&gt;<br>
&gt; struct ngx_chain_s *tmp_in = in;<br>
&gt;<br>
&gt; while (tmp_in)<br>
&gt; {<br>
&gt;     len = tmp_in-&gt;buf-&gt;last - tmp_in-&gt;buf-&gt;pos;<br>
&gt;<br>
&gt;     if (len &lt;= 0)<br>
&gt;     {<br>
&gt;           if (tmp_in-&gt;next == NULL)break;<br>
&gt;<br>
&gt;           tmp_in = tmp_in-&gt;next;<br>
&gt;           continue;<br>
&gt;     }<br>
&gt;<br>
&gt;     // copy the buf to somewhere<br>
&gt;<br>
&gt;<br>
&gt;     if (tmp_in-&gt;next == NULL)<br>
&gt;     {<br>
&gt;         break;<br>
&gt;     }<br>
&gt;<br>
&gt;     tmp_in = tmp_in-&gt;next;<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt; if (tmp_in-&gt;buf-&gt;last_buf)<br>
&gt; {<br>
&gt;     //end of the buf<br>
&gt; }<br>
&gt;<br>
&gt;  i set proxy_buffering off; but when i want to get a more little bigger file<br>
&gt; about 200KB<br>
&gt;<br>
&gt; i always got len &lt;= 0 buf , so can u tell me why ? and how to resolve that?<br>
<br>
</div></div>Buffers with (last - pos) &lt;= 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>