Title: Little changes in rtcSocketHttpSrvProv.pas Post by: xstarter on April 27, 2012, 09:20:56 AM Hello Danijel,
I changed a little code in the topic unit. Can you add this changes in your version, please? Was: Code: procedure TRtcSocketHttpServerProvider.TriggerDataSent; Now: Code: procedure TRtcSocketHttpServerProvider.TriggerDataSent; Sometimes I have LenToSend=-1, but Response after this still not Done, so my change helps. Thank you. Title: Re: Little changes in rtcSocketHttpSrvProv.pas Post by: D.Tkalcec (RTC) on April 27, 2012, 12:00:36 PM That change would break HTTP/1.0 and streaming functionality, where content length is NOT specified and LenToSend will be -1 until the connection is closed. If you are getting into situations where LenToSend=-1, but you are NOT using HTTP/1.0 or streaming without explicitly setting ContentLength, it means that there is an error somewhere else.
Best Regards, Danijel Tkalcec Title: Re: Little changes in rtcSocketHttpSrvProv.pas Post by: D.Tkalcec (RTC) on April 27, 2012, 01:00:50 PM Instead of making the change you've made, I would recommend adding a check after Dec(LenToSend,DataOut) in the TriggerDataOut method inside the same unit (rtcSocketHttpSrvProv.pas):
Code: procedure TRtcSocketHttpServerProvider.TriggerDataOut; If that exception does happen in your Project, then I will need an example Project which demonstrates the issue, with instructions on how to reproduce it, so I can perform my own tests to find out what is wrong. Best Regards, Danijel Tkalcec Title: Re: Little changes in rtcSocketHttpSrvProv.pas Post by: D.Tkalcec (RTC) on April 27, 2012, 01:19:17 PM In addition to the example project, I also need to know which platform you are compiling the project for (Win32, Win64, OSX, iOS emulator or iOS device) and which compiler you are using.
Best Regards, Danijel Tkalcec Title: Re: Little changes in rtcSocketHttpSrvProv.pas Post by: D.Tkalcec (RTC) on May 03, 2012, 06:46:41 PM RTC SDK v5.16 is now ready for download, with improved "LenToSend" overflow checking, as well as debug logging for any unexpected "DataOut" or "LenToSen" conditions (just declare the "RTC_DEBUG" compiler directive). Should you have problems with the "LenToSend" counter going below zero when using the "RTC SDK v5.16" update (without your modifications), then I will need an example Project for testing, because this is definitely not normal behavior.
Best Regards, Danijel Tkalcec |