---- lighttpd-1.4.19/src/mod_compress.c 2008-09-19 13:24:30.921429633 +0300
+--- lighttpd-1.4.19/src/mod_compress.c 2008-09-19 14:16:06.292324544 +0300
+++ lighttpd-1.4.19/src/mod_compress.c 2008-09-19 14:16:06.292324544 +0300
@@ -49,12 +49,14 @@
buffer *compress_cache_dir;
plugin_config **config_storage;
plugin_config conf;
-@@ -154,6 +156,7 @@
+@@ -67,6 +69,7 @@
+
+ p->ofn = buffer_init();
+ p->b = buffer_init();
++ p->encodings_arr = array_init();
+
+ return p;
+ }
+@@ -154,6 +157,7 @@
{ "compress.cache-dir", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },
{ "compress.filetype", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },
{ "compress.max-filesize", NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION },
{ NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
};
-@@ -166,10 +169,12 @@
+@@ -166,10 +170,12 @@
s->compress_cache_dir = buffer_init();
s->compress = array_init();
s->compress_max_filesize = 0;
p->config_storage[i] = s;
-@@ -177,6 +182,32 @@
+@@ -177,6 +183,32 @@
return HANDLER_ERROR;
}
if (!buffer_is_empty(s->compress_cache_dir)) {
struct stat st;
mkdir_recursive(s->compress_cache_dir->ptr);
-@@ -587,6 +618,7 @@
+@@ -587,6 +619,7 @@
PATCH(compress_cache_dir);
PATCH(compress);
PATCH(compress_max_filesize);
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
-@@ -606,6 +638,8 @@
+@@ -606,6 +639,8 @@
PATCH(compress);
} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("compress.max-filesize"))) {
PATCH(compress_max_filesize);
}
}
}
-@@ -668,27 +702,19 @@
+@@ -668,27 +703,19 @@
if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Accept-Encoding"))) {
int accept_encoding = 0;
char *value = ds->value->ptr;