WebHub Object Pascal Components

TtpSleeperThread Guaranteed Exit v3.280
WebHub apps which have intermittent trouble exiting can use one of their OnDestroy event handlers in datamodule to call AtomicExchange(iTPackApplicationTerminating, 1 ); // uses tpShareB and that will guarantee that all the sleeper threads exit when the EXE closes down.
Delphi 10.4.2 support v3.280
Recompiled with 10.4.2
Response Stream AutoCreate v3.280
The TwhResponseStream.AutoCreate method has been made more robust with retry logic to sidestep file-in-use issues.
App HeartBeat v3.280
The app now writes its heartbeat file after a maximum of 60 seconds of sustained traffic.
TwhConnection.Heartbeat in webCall.pas
Delphi 11.0 support v3.281
Full support for latest compiler which is Delphi 11 Alexandria.
Fixed: SetContentType v3.281
WebApp.Response.SetContentType( proJS, ''); now works. Previously the content type remained HTML unless you used the SETPROLOGUETYPE command.
Error EB507 if PAGE macro used to run a page in design or scaffold mode v3.282
Symptom: calling a page that used the PAGE macro to run another page, which itself was in scaffold mode, left the Content-Type blank. This had little consequence unless header x-content-type-options: nosniff was used.
Advice: for any whpage definitions in scaffold mode, change the WHTEKO code, and replace the PAGE call with: FLUSH, calling the page as a droplet (plus its automatic header and footer as required), followed by CLOSE.
The browser will now receive an empty response, and the error log will mention EB507 and indicate which PageID is in which limiting mode.
Source: TwhRespondingApp.DoAPage in webSend.pas
Refactored TwhBasicResponse.HtmlHeader v3.282
The prologuemode on the TwhPage takes precedence over any on the Response object at runtime.
Increased security when PAGE macro called v3.282
Flush prior page content before starting next page, just in case an exception is raised on the next page.
ContentTypeHeader sends Untitled instead of a blank string v3.282
PrologueTypeFromString accepts full syntax in addition to abbreviations for JavaScript and JSON v3.282
Delphi 11.1 support v3.282
Full support on win32 for latest compiler which is Delphi 11.1
Delphi 11.1 win64 support v3.283
Full support on win32 and win64 with Delphi 11.1, running with or without runtime packages.
Two win64 issues were fixed in unit Cromis.DirectoryWatch.pas, specific to win64 with runtime packages.
Test project: webhubdemos\Source\StandaloneDemos\DirWatch_Test\DirWatch_Test.dpr
Delphi 11.1 win64 support v3.284
Symptom: your custom EXEs start, but after a relatively short time with incoming traffic, whadmin report connected shows that one or more of your EXE instances is closed instead of open, and the EXE will not answer any more requests until restarted. This is due to an A/V in the webCall unit.
For D28, there is no longer a check on the memory address of the WebAppOutput object. For earlier versions, the check has been maintained as-was except that it now uses NativeInt instead of Integer, which removes false negatives on win64.
Clearing D28 compiler warnings, unit by unit v3.284
These units compile in Delphi 11.1 without warnings on win32 and win64: Cromis.DirectoryWatch, MultiTypeApp, MultiTypeAppSvc, tpStreams, ucInteg, ucPos, ucShell, ucURLEncode, ucString8, ucVers, uCode, ZM_UTF8StringUtils.
Moving away from Indy within ucHttps.pas utility code v3.284
In TPack ucHttps.pas, the DownloadFile, HTTPSGet and HTTPSGetFile functions have been refactored to remove the dependencies on the urlmon unit, Internet Explorer settings, Indy and OpenSSL DLLs. Instead these now make use of the Delphi Net.HttpClientComponent unit.
HTTPSPost refactoring is pending.
ucJsonWrapper.pas works better with Delphi 10.4.x and 11.x v3.284
In TPack, ucJSONWrapper.pas has been updated to better support D27 and D28. All DUnitX tests pass on win32 and win64 for D26 through D28.
Nonetheless, if you call VarJSONParse too often with the same Variant on the stack, you can run into Access Violations in Delphi 11.1. Unresolved.
Delphi 11.2 support v3.285
Full support for latest compiler which is Delphi 11.2
For win32 only, the WebHub units that require BDE do compile if you have installed the Delphi BDE components yourself, locally.
Delphi 11.3 support v3.286
Full support for latest compiler which is Delphi 11.3
For win32 only, the WebHub units that require BDE do compile if you have installed the Delphi BDE components yourself, locally.
Delphi 12 Athens support v3.287
Full support for latest compiler which is Delphi 12 as of November 2023
Several DPK files had to be changed to load into Delphi 12, including ldiRegEx and the WebHub Wizard packages. These had failed to load into the Delphi IDE, with an error message about not finding the PACKAGEINFO.
wdbChart.pas v3.287
Cleared D29 compiler warnings
ldiRegEx packages v3.287
Added version resource to the DPK so that Delphi IDE would load the package instead of complaining about missing PACKAGEINFO resource.
Removed conflict with CodeSiteLogging during finalization within DLLs v3.287
Source: whutil_ZaphodsMap.pas plus misc TPack units
This improves the Setup of WebHub Runtime, WebHub Components and Rubicon, eliminating an NT.DLL error at the tail end of the Setup process.
(top)

The Hub

Hub.exe compiled with Delphi 11.1 v3.282
Reference: 11.1 re DEP, ASLR and Terminal Server Aware
DEP = Data Execution Prevention; ASLR = Address Space Layout Randomization. These are supported by default for anything compiled by Delphi 11.1 as of ~March 2022.
See also: How to enable DEP and ASLR to reduce the attack vector of your Delphi applications on Windows
The Hub.exe has been shipping for win64 for a long time. This is the first release with DEP and ASLR support turned on.
Hub.exe IPC improved v3.283
Hub.exe compiled with Delphi 12 Athens “D29” v3.287
(top)

WebHub Runners

File Upload v3.280
For files larger than 48kb, if the ReadClient calls fail prior to the expected full content-size arriving, an error is logged.
Sustained High Traffic v3.280
An issue has been fixed which had been preventing the runner from sustaining continual high traffic.
The symptom had been that AppNotRunning situation was reported erroneously.
Timeout situation issued when runner cannot open required response from App v3.280
In rare circumstances, the runner may try to use the response from the App yet find no file. Previously this led to crashes within w3wp.exe. Now the runner issues the timeout situation message.
Runisa.dll supports DEP and ASLR v3.282
Runisa.dll IPC improved v3.283
Runisa.dll compiled with Delphi 12 “D29” v3.287
Only the win64 runner is included in the public release. The win32 runner is available upon request.
(top)