Martin Jonsson wrote:
>I've finally applied your patches, with some minor modifications, to the
>main 5.0 repository.
I see. Thanks, checked and reverified.
>(What was "the last outstanding bug"? The stale Content-Type value used
>to decide whether to compress or not?)
No, I fixed another critical one.
The current patch(set) still in use for my version is (the one in http.pike
is the critical one (obviously)):
From: Stephen R. van den Berg <<srb[at]cuci.nl>>
Subject: Tune and fix HTTP compression
---
server/base_server/configuration.pike | 2 +-
server/protocols/http.pike | 2 +-
server/start | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/base_server/configuration.pike
b/server/base_server/configuration.pike
index 43bbfc0..d40d2ca 100644
--- a/server/base_server/configuration.pike
+++ b/server/base_server/configuration.pike
@@ -4956,7 +4956,7 @@ low."))->add_changed_callback(lambda(object v)
{ http_compr_minlen = v->query(); });
http_compr_minlen = query("http_compression_min_size");
- defvar("http_compression_max_size", 1048576,
+ defvar("http_compression_max_size", 0,
DLOCALE(1006, "Compression: Maximum content size"),
TYPE_INT,
DLOCALE(1007, "The maximum file size for which to enable compression. "
diff --git a/server/protocols/http.pike b/server/protocols/http.pike
index 3bff4f2..92c802b 100644
--- a/server/protocols/http.pike
+++ b/server/protocols/http.pike
@@ -2368,7 +2368,7 @@ void send_result(mapping|void result)
if(compressed =
try_gzip_data(data, variant_heads["Content-Type"])) {
data = compressed;
- file->encoding = encoding = "gzip";
+ encoding = "gzip";
}
}
#endif
diff --git a/server/start b/server/start
index e2037e3..793b7ed 100755
--- a/server/start
+++ b/server/start
@@ -131,7 +131,7 @@ setup_environment
####### BEGIN ARGUMENT PARSING
-DEFINES="$DEFINES -DRAM_CACHE"
+DEFINES="$DEFINES -DRAM_CACHE -DHTTP_COMPRESSION"
# Thread enabling.
# FIXME: Ought to use case...esac.
--
tg: (a71defc..) t/Tune-and-fix-HTTP-compression (depends on: 5.0)
--
Sincerely,
Stephen R. van den Berg.
"Your mouse has moved, Windows (tm) needs to be restarted in order for
this change to take effect. Reboot now? [Y]"
|