EldoS | Feel safer!

Software components for data protection, secure storage and transfer

C++ FileSender Http Transport MaxMsgSize Issue

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
Posted: 04/10/2008 12:15:03
by Aaron Schnarr (Basic support level)
Joined: 04/10/2008
Posts: 2

I recently downloaded the eval of MsgConnect, and have been messing around with the C++ FileSender example. By default, the example uses Http Transport, and works fine for small and large files.
However, if you switch to Socket Transport (comment out the #define USE_HTTP) any file larger than 16k will not be sent and will cause a timeout.

Upon looking into the intitialization of the class, it appears that both Http and Socket transport are set for MaxMsgSize of 16384 (ht->setMaxMsgSize(16384);). However, in the function SendDataBlock(CElFileTransInfo* Info), the DataSize is checked against 32768.
if (left < 32768)
msg.DataSize = left;
msg.DataSize = 32768;

I modified this code to be:
if (left < 15768)
msg.DataSize = left;
msg.DataSize = 15768;

With this DataSize, the Socket Transport was able to properly transfer the file.
This would seem to indicate that Http Transport is ignoring the MaxMsgSize setting, since it was able to receive and handle messages with data almost 2x the Max size.
Is this a bug with the Http Transport, or should it behave differently than the Socket Transport in this manner?

Thanks in advance.
Posted: 04/10/2008 12:26:47
by Eugene Mayevski (Team)

Thank you very much for the detailed report.
Looking into the code I can't see why HTTP transport ignores MaxMsgSize. Some debugging is needed. I think this will be fixed on weekends and new build will be available somewhere next week.

Sincerely yours
Eugene Mayevski
Posted: 04/11/2008 09:13:05
by Eugene Mayevski (Team)

Fixed. This is C++-specific issue.

Sincerely yours
Eugene Mayevski



Topic viewed 3943 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!