Hi,
Thanks Henrik and Robert for all of your suggestions (particularly hints
of where to patch squid-2.5, and about rfc2616, 215 warning).
New issues about this:
1) When to compress:
a) Client must have sent Accept-Encoding: and gzip has to be listed
in supported encodings ('compress' could be implemented with not
too much effort).
b) Server response should not be Transfer-Encoding: chunked. If it
is, it should be de-chunked, right?
c) Content-type of answer is text/html or text/plain (this could be
moved to gzip_access, I think).
d) Answer from server is not already compressed :-).
d) Server response does not contain Content-Range header (in case of
a miss). I simply won't compress partial data. This is due to
the fact that Ranges header usually is used on 'resume download'
operation, and I want to speed up interactive navigation.
e) gzip_access (new directive) is ok
I will add this in order to enable compression only on dial-up
clients (slow clients).
Is this ok?
2) Where to compress:
I will compress on comm_write.
Thank you very much for your wise adivce.
I have to check where to start compressing, since comm_write only
gets data to be written (other wise, headers will be compressed to).
Would it be OK to add something like this to struct _fde? (I mean,
is it the right place?).
struct {
unsigned int compress_level:4; /* compression level: 1-9 */
unsigned int compress_offset;
/* how many bytes have to skip before to compress */
z_stream* zstream; /* zlib internal state */
} compress;
3) Which squid to patch:
Unless squid 3 is going to be STABLE next week, I have to work on
squid 2.5, since I have a deadline of 1 month to accomplish this :-(
Of course, Once this is working, I will start working on a patch
for squid3.
4) Answer modification:
a) Should I alter Vary header (by adding Accept-Encoding)?
b) ETag: May I build it from md5sum of compressed content?
Thank you very much in advance,
-- Gonzalo Arana <garana@uolsinectis.com.ar> UOL-Sinectis S.A.Received on Thu Aug 14 2003 - 06:03:10 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:28 MST