dk_sz
2008-07-22 20:25:39 UTC
Hi,
I am having problems with some IIS servers and
enabling GZIP/defalte compression in TidHttp.
...
Using D2007 R2 Pro. The latest working fulgan build
I have is from 2007 December (Could not get 2008
April to work due to a Indy/FastMM issue)
...
I create a TidHTTP like this:
FCompressorZLib := TIdCompressorZLib.Create;
FHTTP.Request.AcceptEncoding := 'gzip,deflate,identity';
FHTTP.Compressor := FCompressorZLib;
FHTTP.Request.Accept := 'Accept:
text/xml,application/xml,application/xhtml+xml,text/html,text/plain,*/*';
FHTTP.Request.AcceptCharSet := 'Accept-Charset: utf-8,*;q=0.5';
Then get/connect like this:
FHTTP.GET('AFAIK: IIS website *deflate* compression');
...And you get decompression error exception.
[I can email some examples, but would prefer not to post
customers website URLs here until I have permission]
I suspect it may be Indy/IIS disagreeing on "deflate"
(see comments: http://blog.marcocantu.com/blog/deflatingblog.html)
Perhaps the header that is wrong?
...
Anyways, at this point everything goes wrong afterwards.
Even if one does not use persistent connections,
the cookies / cookiemanager gets out of sync...
And with persistent connections, the socket/buffer is in
error/dirty state? And will yield exceptions and errors :-(
It does not help to:
FHTTP.Request.AcceptEncoding := 'identity';
FHTTP.Compressor := nil;
1)
Is there any way to "reset" tidhttp properly?
2)
How do I prevent this from happening? I think there is
an Indy/IIS issue as well, but maybe it is my usage that is
wrong? (Or perhaps something wrong in ZLib/version?)
best regards
Thomas Schulz
I am having problems with some IIS servers and
enabling GZIP/defalte compression in TidHttp.
...
Using D2007 R2 Pro. The latest working fulgan build
I have is from 2007 December (Could not get 2008
April to work due to a Indy/FastMM issue)
...
I create a TidHTTP like this:
FCompressorZLib := TIdCompressorZLib.Create;
FHTTP.Request.AcceptEncoding := 'gzip,deflate,identity';
FHTTP.Compressor := FCompressorZLib;
FHTTP.Request.Accept := 'Accept:
text/xml,application/xml,application/xhtml+xml,text/html,text/plain,*/*';
FHTTP.Request.AcceptCharSet := 'Accept-Charset: utf-8,*;q=0.5';
Then get/connect like this:
FHTTP.GET('AFAIK: IIS website *deflate* compression');
...And you get decompression error exception.
[I can email some examples, but would prefer not to post
customers website URLs here until I have permission]
I suspect it may be Indy/IIS disagreeing on "deflate"
(see comments: http://blog.marcocantu.com/blog/deflatingblog.html)
Perhaps the header that is wrong?
...
Anyways, at this point everything goes wrong afterwards.
Even if one does not use persistent connections,
the cookies / cookiemanager gets out of sync...
And with persistent connections, the socket/buffer is in
error/dirty state? And will yield exceptions and errors :-(
It does not help to:
FHTTP.Request.AcceptEncoding := 'identity';
FHTTP.Compressor := nil;
1)
Is there any way to "reset" tidhttp properly?
2)
How do I prevent this from happening? I think there is
an Indy/IIS issue as well, but maybe it is my usage that is
wrong? (Or perhaps something wrong in ZLib/version?)
best regards
Thomas Schulz