Welcome! Log In Create A New Profile

Advanced

Re: [ANNOUNCE] gunzip filter module 0.3

April 19, 2010 02:08PM
Perfect Max,

understood your style of module, right now I'm working hard to deploy it just with small hacks.

Actually we don't need to do unzipping always, we need unzip only for 200 upstream responses and only for text/html answers for reducing load on server. Looks like better to have coordination with your way of development, so I need small instructions how better to do it, and I'll send my patch for it.

--- /home/roman/work/ngx_http_gunzip_filter_module-0.3/ngx_http_gunzip_filter_module.c 2010-03-22 11:11:16.000000000 -0700
+++ ngx_http_gunzip_filter_module.c 2010-04-16 16:37:01.000000000 -0700
@@ -132,6 +132,7 @@
if (!conf->enable
|| r->headers_out.content_encoding == NULL
|| r->headers_out.content_encoding->value.len != 4
+ || r->upstream->state->status != 200
|| ngx_strncasecmp(r->headers_out.content_encoding->value.data,
(u_char *) "gzip", 4) != 0)
{
@@ -142,6 +143,9 @@

r->gzip_vary = 1;

+ r->gzip_tested = 1;
+ r->gzip_ok = 1;
+
if (!r->gzip_tested) {
if (ngx_http_gzip_ok(r) == NGX_OK) {
return ngx_http_next_header_filter(r);
@@ -315,7 +319,7 @@
ctx->zstream.opaque = ctx;

/* windowBits +16 to decode gzip, zlib 1.2.0.4+ */
- rc = inflateInit2(&ctx->zstream, MAX_WBITS + 16);
+ rc = inflateInit2(&ctx->zstream, MAX_WBITS + 32); // yahoo looks weird with previous init

if (rc != Z_OK) {
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,

If not apply r->upstream->state->status != 200 in headers processing I'm getting a lot of errors in log, one of it is http://yandex.ru/yandsearch?text=sunken , which sends 302 redirect url with gzipped content, I've tried to fix it, but found just error in zlib, when I've stored dumped data and used 'gzip -d' on it all decompressed fine, and I've got normal HTML. How better to debug it? What advice you can give me?

sincerely Roman Vasilyev
Subject Author Posted

[ANNOUNCE] gunzip filter module 0.3

Maxim Dounin March 22, 2010 02:28PM

Re: [ANNOUNCE] gunzip filter module 0.3

Ryan Malayter March 23, 2010 09:22AM

Re: [ANNOUNCE] gunzip filter module 0.3

Maxim Dounin March 23, 2010 09:52AM

Re: [ANNOUNCE] gunzip filter module 0.3

Ryan Malayter March 24, 2010 08:56AM

Re: [ANNOUNCE] gunzip filter module 0.3

Maxim Dounin March 24, 2010 10:26AM

Re: [ANNOUNCE] gunzip filter module 0.3

Ryan Malayter March 24, 2010 06:58PM

Re: [ANNOUNCE] gunzip filter module 0.3

Maxim Dounin March 24, 2010 07:56PM

Re: [ANNOUNCE] gunzip filter module 0.3

theromis1 April 19, 2010 02:08PM

Re: [ANNOUNCE] gunzip filter module 0.3

Maxim Dounin April 19, 2010 10:20PM

Re: [ANNOUNCE] gunzip filter module 0.3

theromis1 April 16, 2010 03:14PM

Re: [ANNOUNCE] gunzip filter module 0.3

Maxim Dounin April 17, 2010 05:42AM

Re: [ANNOUNCE] gunzip filter module 0.3

theromis1 April 27, 2010 06:30PM

Re: [ANNOUNCE] gunzip filter module 0.3

theromis1 April 20, 2010 07:00PM

Re: [ANNOUNCE] gunzip filter module 0.3

Maxim Dounin April 21, 2010 11:22PM

Re: [ANNOUNCE] gunzip filter module 0.3

theromis1 April 22, 2010 09:36PM

Re: [ANNOUNCE] gunzip filter module 0.3

theromis1 May 03, 2010 01:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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