[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Turn on deflate in the client

From: Justin Erenkrantz <jerenkrantz_at_ebuilt.com>
Date: 2002-02-15 01:02:09 CET

On Thu, Feb 14, 2002 at 11:49:57PM +0000, Joe Orton wrote:
> Of note is that mod_deflate seems to be buffering the entire response in
> memory before sending it to the client, and using a fixed-length
> response (precomputed Content-Length) rather than streaming it using
> chunked transfer-encoding. This comment in the source would indicate
> that this is a known problem:
> /* XXX FIX: do we need the Content-Size set, or can we stream?
> * we should be able to stream */
> /* ignore flush buckets for the moment.. we can't stream as we
> * need the size ;( */
> For the response that fails, the GET for fs-test.c, the server is
> reporting a Content-Length which matches the actual size of fs-test.c in
> my working copy, 213750, whereas the Content-Length (if used) *should*
> be equal to the compressed size, as it is for all the other responses.
> After 15 blocks of response reach the client, totalling 38991 bytes, the
> connection is closed by the server.
> So as far as I can tell here, this is a server problem.

I think we might be leaving in C-L if the core is setting it.
Can one of you guys try this patch?

No way will I find the time to test this myself. If it looks
good, I'll commit it into httpd-2.0 as it seems like it should
do the trick. -- justin

Index: modules/experimental/mod_deflate.c
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_deflate.c,v
retrieving revision 1.2
diff -u -r1.2 mod_deflate.c
--- modules/experimental/mod_deflate.c 8 Dec 2001 13:05:56 -0000 1.2
+++ modules/experimental/mod_deflate.c 14 Feb 2002 23:59:01 -0000
@@ -297,6 +297,7 @@
         apr_table_setn(r->headers_out, "Content-Encoding", "gzip");
         apr_table_setn(r->headers_out, "Vary", "Accept-Encoding");
+ apr_table_unset(r->headers_out, "Content-Length");

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:08 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.