Some time ago I made some tests using next icshttpserver changes to
provide gzip compression.
Because I use the free ZLibEx unit in my projects
uses
...
{$IFDEF USE_ZLIB}
// dZLib, zDeflate, ZLibh,
ZLibEx,
{$ENDIF}
Commented all the other code inside {$IFDEF USE_ZLIB} {$ENDIF} blocks
and replaced the two inside procedure AnswerStream to
{$IFDEF USE_ZLIB}
var
// Count : Integer;
FZDocStream: TMemoryStream;
{$ENDIF}
begin
...
{$IFDEF USE_ZLIB}
if (Pos('gzip', FRequestAcceptEncoding) > 0) then
begin
PutStringInSendBuffer('Content-Encoding: gzip' + #13#10);
FZDocStream := TMemoryStream.Create;
ZcompressStream2(FDocStream, FZDocStream, zcDefault, 31, 9,
zsDefault);
FDocStream.free;
FDocStream := FZDocStream;
end;
{$ENDIF}
...
end;
And seems to work just fine.
Angus Robertson - Magenta Systems Ltd wrote:
Does anyone know who added the unfinished ZLIB code to provide
deflated replies in the web server component?
I don't know.
Are they going to
finish it, or do we need to start again?
I don't think this work will be continued by anybody else but the
guy who asked ;-) This code exists unchanged since I first used
the HTTP server component in one of my projects a couple of years
ago.
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be