|IMAP CLOSE command and deflate compression||Limilabs||6/16/12 12:07 PM|
Gmail's IMAP server does not send response to CLOSE command when deflate compression (COMPRESS DEFLATE) is used. Not a single byte can be received.
The server replies with proper responses to all other commands.
|This message has been hidden because it was flagged for abuse.|
|Re: IMAP CLOSE command and deflate compression||bkennelly||6/16/12 5:42 PM|
I am going to let the Gmail team know what you found.
|Re: IMAP CLOSE command and deflate compression||Limilabs||6/18/12 12:59 AM|
This is not helpful at all.
I have no problems downloading mail, and none of the parts of the article applies to this problem.
|Re: IMAP CLOSE command and deflate compression||Limilabs||6/18/12 12:58 AM|
|Re: IMAP CLOSE command and deflate compression||Limilabs||6/21/12 4:52 AM|
It seems the problem is much more serious.
Only first command send to the server works and returns a response.
After sending a second command not a single byte can be received.
|Re: IMAP CLOSE command and deflate compression||bkennelly||6/21/12 8:33 AM|
OK, now it looks like a problem with your test harness. Compression does work, and is used by several clients.
Verify that you are adding CR and LF to the end of each command, and that you are flushing the compression buffer and sending everything after every command.
|Re: IMAP CLOSE command and deflate compression||Limilabs||6/21/12 9:19 AM|
I started do believe so.
In .NET's implementation of deflate stream, Flush does not write all buffered data to underlying stream.
Close does, but reusing or recreating such stream does not work. I'm not yet 100% sure,
but it seems that FlushMode = FlushType.Sync is the key - maybe it will help others, with the same problems.
|Re: IMAP CLOSE command and deflate compression||bkennelly||6/21/12 9:47 AM|
Yes, a sync flush is the way to go, but I am not familiar with .NET, so I don't know the syntax. Be sure to post back here.
|Re: IMAP CLOSE command and deflate compression||Limilabs||6/21/12 10:55 AM|
All tests show that FlushType.Sync works:
_upload = new DeflateStream(baseStream, CompressionMode.Compress, true);
Thanks for your help and sorry for all confusion.