httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zaid B. Amireh" <z...@dakwak.com>
Subject mod_filter Chaining and Duplicate Buckets.
Date Tue, 29 May 2012 15:41:02 GMT
Hello,

I have a content filter module that is operating in a proxy environment, the module parses
HTML and XML documents and changes quite a bit of content.

The issue I'm facing is handling gzip'ed content, I tried the following mod_filter config

===============
FilterDeclare inflate
FilterDeclare mymodule
FilterDeclare deflate

FilterProvider inflate INFLATE resp=Content-Encoding $gzip
FilterProvider mymodule mymodule-filter resp=Content-Type $text/html
FilterProvider deflate DEFLATE resp=Content-Encoding $gzip

FilterTrace inflate 1
FilterTrace deflate 1
FilterTrace mymodule 1

FilterChain inflate mymodule deflate
===============

What is happening is that my module is receiving duplicate buckets, here is a snippet from
the log

===============
mod_filter.c(117): inflate
mod_filter.c(122): inflate: type: TRANSIENT, length: 1202
mod_filter.c(117): inflate
mod_filter.c(122): inflate: type: FLUSH, length: 0
mod_filter.c(117): mymodule
mod_filter.c(122): mymodule: type: HEAP, length: 3746
mod_filter.c(122): mymodule: type: FLUSH, length: 0
mod_filter.c(117): inflate
mod_filter.c(122): inflate: type: TRANSIENT, length: 1400
mod_filter.c(117): inflate
mod_filter.c(122): inflate: type: TRANSIENT, length: 1520
mod_filter.c(117): mymodule
mod_filter.c(122): mymodule: type: HEAP, length: 3746
mod_filter.c(122): mymodule: type: FLUSH, length: 0
mod_filter.c(122): mymodule: type: HEAP, length: 8096
...
....
.....
mod_deflate.c(1113): Zlib: Inflated 9637 to 41199 : URL /
mod_filter.c(117): mymodule
mod_filter.c(122): mymodule: type: HEAP, length: 3746
mod_filter.c(122): mymodule: type: FLUSH, length: 0
mod_filter.c(122): mymodule: type: HEAP, length: 8096
mod_filter.c(122): mymodule: type: HEAP, length: 3829
mod_filter.c(122): mymodule: type: FLUSH, length: 0
mod_filter.c(122): mymodule: type: HEAP, length: 5008
mod_filter.c(122): mymodule: type: FLUSH, length: 0
mod_filter.c(122): mymodule: type: HEAP, length: 5412
mod_filter.c(122): mymodule: type: FLUSH, length: 0
mod_filter.c(122): mymodule: type: HEAP, length: 6947
mod_filter.c(122): mymodule: type: FLUSH, length: 0
mod_filter.c(122): mymodule: type: HEAP, length: 8096
mod_filter.c(122): mymodule: type: HEAP, length: 65
mod_filter.c(122): mymodule: type: EOS, length: 0
mod_filter.c(117): deflate
mod_filter.c(122): deflate: type: TRANSIENT, length: 198242
===============

The first bucket of size 3746 was received 7 times by the module, the second bucket of 8096
was received 6 times and so on.

I'm really stumped as to what is causing this behavior, any ideas?

virtually yours
Zaid
Mime
View raw message