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 1002 May 22, 2014 10:24AM

Re: Buffers Chain

Maxim Dounin 573 May 23, 2014 05:14AM

Re: Buffers Chain

Paulo Silva 541 May 23, 2014 05:24AM

Re: Buffers Chain

Maxim Dounin 593 May 23, 2014 06:22AM

Re: Buffers Chain

Paulo Silva 505 May 23, 2014 06:58AM

Re: Buffers Chain

Maxim Dounin 539 May 23, 2014 08:00AM

Re: Buffers Chain

Paulo Silva 519 May 23, 2014 09:18AM

Re: Buffers Chain

Maxim Dounin 526 May 23, 2014 09:42AM

Re: Buffers Chain

Paulo Silva 550 May 23, 2014 09:52AM

Re: Buffers Chain

Paulo Silva 484 May 25, 2014 07:24PM

Re: Buffers Chain

splitice 631 May 26, 2014 04:12AM

Re: Buffers Chain

Paulo Silva 520 May 26, 2014 04:20AM

Re: Buffers Chain

splitice 669 May 26, 2014 04:30AM

Re: Buffers Chain

Paulo Silva 526 May 26, 2014 05:18AM

Re: Buffers Chain

splitice 775 May 26, 2014 05:30AM

Re: Buffers Chain

Paulo Silva 573 May 27, 2014 04:16AM

Re: Buffers Chain

Maxim Dounin 662 May 27, 2014 07:10AM



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

Online Users

Guests: 187
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