WebHub Object Pascal Components

Cookies HttpOnly v3.270
Cookies are sent with the HttpOnly flag False by default.
The AddCookie method has a new optional parameter to override this if you need to access the cookie value in JavaScript.
Base 64 UTF8String v3.270
Use String or UTF8String, not AnsiString, with the routines in the ucBase64.pas unit.
Phase out AnsiString, AnsiChar, PAnsiChar where possible v3.270
Moved UnicodeToAnsiCodePage from ucString to ucStringWinAnsi in TPack.
Start Process v3.271
The StartEXE routine is no longer in ucShell.pas.
There is a variation of Launch that can be used on Linux to start a process and wait for its completion.
ucMsTime unit supports Linux v3.271
All routines in ucMsTime including nowUTC compile and pass DUnitX tests on win32, win64 and linux64.
The following unused functions have been deleted: WinTimerSec, WinTimerMin and WinTimerHrs.
TFileStream promoted v3.271
TtpSharedFileStream has been removed from ucFile. Instead, use TFileStream from Classes.pas and when creating a new file, use fmCreate or fmShareDenyWrite for the mode.
Phase out unreferenced units v3.271
Moved the following units out of TPack and into Source Forge with an MIT License. If you need any of these units, add a SVN Externals entry to your SVN repository to pull the latest copy of the files.
  • TtpCriticalSection from utIpcObj moved to tpCritSect. TLogonUser from utIpcObj commented out.
  • tpRTTI
  • ucOnce
  • ucPipe
  • utIPCObj
  • tpShareI
Isolate Windows-only code v3.271
The global security object @gsa had been defined in utIpcObj.pas for many years. Now it is located in a new unit ucSecurityObj which is part of TPack and WebHub.
If your code had been using utIpcObj in order to take advantage of this global object, add uses ucWinSecurityObj to your code and recompile.
SHELL and START commands v3.271
Re-enabled. Source: webApp.pas.
Fixed problem where parameters had not been sent through to the called program.
D25 with-clause check
Use the following regex against your *.pas files to find out whether you have any statements that perhaps worked in an older version of Delphi but now fail to assign what you intended. This finds expressions such as abc := abc; which could have made sense within a with ... clause where the left side could be assigned to and the right side was a constant with coincidentally the same name. Obviously this type of code needs to be cleaned up to avoid confusion and bugs. The regex suitable for use with PCRE (including FuzRegex, EditPadPro and Delphi) follows.
\s(?P([a-zA-Z0-9][^. ;]*))\s*:=\s*(?P=name1);
Session cookie on https v3.271
The session cookie is NOT sent HttpOnly.
HTTPSPost v3.271
Additional optional syntax lets you pass a stringlist with key=value pairs to post.
uses ucHttps.pas
uses WideStrUtils with Delphi 10.2
Example, change
SAnsi := UnicodeToAnsiCodePage(S, 1252);


SAnsi := Utf8ToAnsiEx(UTF8String(S), 1252);
Example, change
str := AnsiCodePageToUnicode(AnsiResult, 1252);


str := string(AnsiToUTF8Ex(AnsiResult, 1252));
ucRegNow v3.271
Moved from TPack to source forge repository.
Delphi 10.2.3 support v3.272
WebHub v3.272 is confirmed to work with the latest point release, Delphi Tokyo 10.2.3.
No feature changes.
functions moved to ucLogFileAnsi v3.273
Functions for UTF8 and UTF16 are still in the ucLogFil.pas unit. The following have been moved to the free-no-warranty-delphi-units svn repo on source forge.
StringWriteToFile renamed StringAnsiWriteToFile
StringAppendToFile renamed StringAnsiAppendToFile
Regex issue: invalid error reported v3.271 ... v3.272
This error message "Compiled pattern code or target is NULL, or GroupStartEnd is NULL but GroupStartEndSize > 0" reported by Method "Matches" on Class "TldiRegExMulti" when calling "GetMatch". is always raised when the target string is an empty string.
Resolved in wh v3.273.
WebHub Syntax Report v3.274
In WebHub v3.271 through v3.273, the syntax report complained about invalid PageIDs. Resolved.
The syntax report is available on the HTML > Errors panel under a button click.
TekeroID v3.274
Refactored SendBufferedString to save and restore the TekeroID.
Previously, the TekeroID could be blank when a droplet called a nested droplet.
Unit: webSend.pas
Status: Ubuntu 16.04 support in progress v3.271
The unit testing for TPack and WebHub has been converted to DUnitX so that tests can be run on Windows and Linux, specifically Ubuntu 16.04 LTS.
Much progress has been made and a signficant portion of TPack works on Ubuntu now. ZaphodsMap code works on Ubuntu now, as you can confirm by running the public DUnitX tests for ZaphodsMap (all in source force). However the interprocess control "IPC" code is not complete for TPack yet. That is critical path for any real WebHub work.
Only Delphi 10.2 Tokyo compiles for Linux so if you are interested in deploying your WebHub applications onto a Linux server, you will need to purchase a license for Delphi 10.2 (D25) or later.
GetTickCount rollover v3.275
The components no longer have an issue if running on Windows longer than 21 days and using an older runner e.g. v3.274 or prior.
Source: unit whxpCommTypes

The Hub

Session Cookies v3.270
Session Cookies are always sent as HttpOnly.
Reference: Why HttpOnly; mozilla.org Set-Cookie
Delphi 10.2.3 v3.272
The hub and runner binaries for WebHub Runtime v3.272 were recompiled with Delphi 10.2.3.
No feature changes.
WebHub Runtime Setup v3.274
Links within the ZMAdmin help file changed from http to https wherever possible. This excludes links to static.webhub.com for the XSD references, for now.
Setup no longer creates the WHServiceControl.xml file, which has been unused to date.
Setup no longer sets the filespec for the WHSystemMessages.xml file if a custom value (non-blank string) is already present in the WebHub\cv004\ZMKeybox.xml file.

WebHub Runners

JSON support enhanced v3.271
Posted JSON s now accepted to a stringvar named jsondata. The posted data stream no longer needs to start with varName=, although that syntax still works for anyone who wishes to use it.
String type changed regarding Multi Part Forms v3.273
Slight coding change within CGiVarsExpandMultiPartForm. Source: runUtil.pas
GetTickCount rollover v3.275
The runner has been changed so it never expresses GetTickCount as a negative number within the IPC.
Source: unit whxpCommTypes