Web update update

Three years ago I switched this web site to a secure server (HTTPS). The main difference between HTTP and HTTPS is that HTTPS has the additional SSL/TLS layer to ensure all data being transferred is encrypted and secure. 

The side effect of the switch was the web update functions of APK and AbPK stopped functioning.

Originally I thought the fix would be to simply change the URL in the updaters from HTTP to HTTPS. But it had no effect so I had to dig into the source code.

mxWebUpdate is freeware offered by Max Components. It is still available on the Torry Delphi Developer Library. However the Max Components website is no longer online, and no way to contact the author. Fortunately the source code was included. The component wraps the Windows Internet Library, so my next step was to delve into the Wininet API.

StackOverflow to the rescue. It was simply a matter of setting the correct flag in the call to HttpOpenRequest.

  • Original code: InternetFlag := INTERNET_FLAG_RELOAD
  • Revised code: InternetFlag := INTERNET_FLAG_SECURE

A simple fix that took me three years to discover. I will be posting an update to AbPK soon, still working on significant improvements to APK, stay tuned.

Comments are closed.