EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElHTTPSClient - data not decompressed with Use100Continue?

Posted: 12/09/2013 02:40:04
by Peter Palotas (Basic support level)
Joined: 11/01/2012
Posts: 49

When using TElHTTPSClient with UseCompression=true and Use100Continue=true and performing a POST request, the received data is not decompressed (from its gzip format provided by the server) automatically in the OnData callback. However, with Use100Continue=false the data is automatically decompressed.

Is this a bug in EldoS, or am I missing something?

I have tested it with the following program which sends a POST request to the eldos website and prints the headers received and the first 100 characters of the response to the screen. With Use100Continue enabled it just prints garbage, but I have verified that this is in fact gzipped data that can be decompressed. Without the use of 100-continue, the client automatically decompresses the data and the response is written in clear-text.

class Program
      static void Main(string[] args)
         TElHTTPSClient client = new TElHTTPSClient();
         client.UseCompression = true;
         client.Use100Continue = true;
         client.HTTPVersion = SBHTTPSConstants.TSBHTTPVersion.hvHTTP11;

         client.OnCertificateNeededEx += client_OnCertificateNeededEx;
         client.OnCertificateValidate += client_OnCertificateValidate;
         client.OnReceivingHeaders += client_OnReceivingHeaders;
         client.OnReceive += client_OnReceive;
         client.OnData += client_OnData;

         client.Post("https://www.eldos.com:443/cc/index.php?login=yes", "");

      static void client_OnData(object Sender, byte[] Buffer)
         Console.WriteLine("Data received:\n" + Encoding.UTF8.GetString(Buffer).Substring(0, 100));

      static void client_OnReceivingHeaders(object Sender, SBStringList.TElStringList Headers)
         foreach (var str in Headers)

      static void client_OnReceive(object Sender, ref byte[] Buffer, int MaxSize, out int Written)
         throw new NotImplementedException();

      static void client_OnCertificateValidate(object Sender, SBX509.TElX509Certificate X509Certificate, ref bool Validate)
         Validate = true;

      static void client_OnCertificateNeededEx(object Sender, ref SBX509.TElX509Certificate Certificate)
         Certificate = null;
Posted: 12/09/2013 03:06:31
by Vsevolod Ievgiienko (Team)

Thank you for reporting the problem.

The fix will be included into the next SecureBlackbox build.



Topic viewed 366 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!