Forum: NGINX how can i get a complete proxy content?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0e9ed31bf8241b80e384061cce657aa5?d=identicon&s=25 pf shineyear (Guest)
on 2009-03-16 15:12
(Received via mailing list)
hi

i try to get a complete proxy content  from a body filter like this:

struct ngx_chain_s *tmp_in = in;

while (tmp_in)
{
    len = tmp_in->buf->last - tmp_in->buf->pos;

    if (len <= 0)
    {
          if (tmp_in->next == NULL)break;

          tmp_in = tmp_in->next;
          continue;
    }

    // copy the buf to somewhere


    if (tmp_in->next == NULL)
    {
        break;
    }

    tmp_in = tmp_in->next;

}

if (tmp_in->buf->last_buf)
{
    //end of the buf
}

 i set proxy_buffering off; but when i want to get a more little bigger
file
about 200KB

i always got len <= 0 buf , so can u tell me why ? and how to resolve
that?
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2009-03-16 15:41
(Received via mailing list)
Hello!

On Mon, Mar 16, 2009 at 10:04:16PM +0800, pf shineyear wrote:

>     if (len <= 0)
>     if (tmp_in->next == NULL)
>     //end of the buf
> }
>
>  i set proxy_buffering off; but when i want to get a more little bigger file
> about 200KB
>
> i always got len <= 0 buf , so can u tell me why ? and how to resolve that?

Buffers with (last - pos) <= 0 are prefectly normal, as there is
much more than simple buffers with content in memory.  This
include various special buffers and buffers with content in files.

Maxim Dounin
0e9ed31bf8241b80e384061cce657aa5?d=identicon&s=25 pf shineyear (Guest)
on 2009-03-16 16:10
(Received via mailing list)
how can i get it all?? please ~~
0e9ed31bf8241b80e384061cce657aa5?d=identicon&s=25 pf shineyear (Guest)
on 2009-03-16 17:44
(Received via mailing list)
can u give me some example that can help me to cellect all proxy backend
content in body filter?
0e9ed31bf8241b80e384061cce657aa5?d=identicon&s=25 pf shineyear (Guest)
on 2009-03-17 08:52
(Received via mailing list)
is there any body can help me ?~?~?~
This topic is locked and can not be replied to.