WebHub Object Pascal Components

Cookies HttpOnly v3.270
Cookies are sent with the HttpOnly flag 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);
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.

The Hub

Session Cookies v3.270
Session Cookies are always sent as HttpOnly.
Reference: Why HttpOnly; mozilla.org Set-Cookie

WebHub Runners