Welcome! Log In Create A New Profile

Advanced

Buffers Chain

Paulo Silva
May 22, 2014 10:24AM
Hi,
Let me introduce the Elephant in the room. My name is Paulo and I'm
from Portugal.
I am starting developing nginx modules and I'm having a great time
with buffers chain :D

I'm using nginx as a reverse proxy and my goal is to log the full
response body (HTML) on the server.

I did start with a filter module with a body_filter and my approach is
as follow:

1. Inspect given ngx_chain_t *in linked list to understand if nginx
has the full response (last_buf)
2. On each body_filter call I'm updating a linked list which glues
given ngx_chain_t *in to the previous ones.
3. As soon as I detect the last_buf, I iterate my internal linked list
(and each linked ngx_chain_t lists), dumping buffers content.

Although I'm reaching the last_buf, I'm missing some bytes.

There is another/better/correct approach to do this?

Thanks in advance,
Paulo A. Silva
http://tech.pauloasilva.com
http://linkedin.com/in/devpauloasilva/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Buffers Chain

Paulo Silva 997 May 22, 2014 10:24AM

Re: Buffers Chain

Maxim Dounin 569 May 23, 2014 05:14AM

Re: Buffers Chain

Paulo Silva 537 May 23, 2014 05:24AM

Re: Buffers Chain

Maxim Dounin 589 May 23, 2014 06:22AM

Re: Buffers Chain

Paulo Silva 499 May 23, 2014 06:58AM

Re: Buffers Chain

Maxim Dounin 536 May 23, 2014 08:00AM

Re: Buffers Chain

Paulo Silva 515 May 23, 2014 09:18AM

Re: Buffers Chain

Maxim Dounin 522 May 23, 2014 09:42AM

Re: Buffers Chain

Paulo Silva 547 May 23, 2014 09:52AM

Re: Buffers Chain

Paulo Silva 481 May 25, 2014 07:24PM

Re: Buffers Chain

splitice 627 May 26, 2014 04:12AM

Re: Buffers Chain

Paulo Silva 516 May 26, 2014 04:20AM

Re: Buffers Chain

splitice 665 May 26, 2014 04:30AM

Re: Buffers Chain

Paulo Silva 523 May 26, 2014 05:18AM

Re: Buffers Chain

splitice 770 May 26, 2014 05:30AM

Re: Buffers Chain

Paulo Silva 570 May 27, 2014 04:16AM

Re: Buffers Chain

Maxim Dounin 659 May 27, 2014 07:10AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 206
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready