Joshua Slive wrote:
On Mon, 9 Dec 2002, Henri Gomez wrote:

Ok, it works with SetOutputFilter DEFLATE, I'm now wonder
how to remove *.gif/*.jpg and *.js from being compressed.

I think you will find yourself much better off if you take a few minutes
to peruse:
http://httpd.apache.org/docs-2.0/mod/mod_deflate.html
which Andr� recently spent some time updating.  It has an example that
does exactly what you want.
I tried by it didn't works on the Apache 2.0.39 present in my iSeries
(AS/400).

But it works great on my Linux box with 2.0.43.

BTW, I updated mod_jk 1.2.2-dev, 2.0.4-dev and also mod_webapp
to set the content type the correct way, previously there was
a direct set of content-type and I now use ap_set_content_type :

---

hgomez 2002/12/09 05:19:18

Modified: jk/native/apache-2.0 mod_jk.c
Log:
Make jk works with filters in Apache 2.0, ie mod_deflate and

AddOutputFilterByType DEFLATE text/html.




Revision Changes Path
1.62 +5 -2 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c

Index: mod_jk.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- mod_jk.c 6 Dec 2002 18:54:45 -0000 1.61
+++ mod_jk.c 9 Dec 2002 13:19:17 -0000 1.62
@@ -240,7 +240,10 @@
if(!strcasecmp(header_names[h], "Content-type")) {
char *tmp = apr_pstrdup(r->pool, header_values[h]);
ap_content_type_tolower(tmp);
- r->content_type = tmp;
+ /* It should be done like this in Apache 2.0 */
+ /* This way, Apache 2.0 will be able to set the output filter */
+ /* and it make jk useable with deflate using AddOutputFilterByType DEFLATE text/html */
+ ap_set_content_type(r, tmp);
} else if(!strcasecmp(header_names[h], "Location")) {
#ifdef AS400
/* Fix escapes in Location Header URL*/


Reply via email to