WebHub Object Pascal Components

txtGridVCL unit added v2.111
The txtGrid unit was divided into txtGrid.pas and txtGridVCL.pas to separate out the GUI layer.
Add txtGridVCL to uses clauses if the Delphi compiler cannot compile a unit, saying that TTextGrid is undefined.
Delphi 7, ZaphodsMap package fixed v2.114
One tiny change: for Delphi 7 only, the Run Time Zaphods Map package (DPK) was changed to omit the library suffix 200908.
Form to HTML Converter improved for use with Delphi 2009, 2010 v2.114
Removed runtime and designtime access violations.
Some memory leaks remain, as well as errors in the IDE when the [Browse It] feature is used. In process now.
WebMail fixed re Unicode v2.116
Improvement is relevant for users of Delphi 2009 and 2010. The WebHub demo whSendMail works now.
Changed units: webSock and webMail
New properties v2.116
CentralInfo.YearGMT gives the current year ... helpful for copyright notices in page footers
CentralInfo.PascalCompilerCode gives a code representing the compiler, e.g. D07 for Delphi 7, D14 for Delphi 2010.
MAILTO macro changed v2.116
Additional syntax allows for setting the subject and extra html such as a title. This combines these features, as they were in WebHub v2.010, and adds the true/false as-numeric parameter which has been available in more recent years.
  • targetEMail is required. Examples: info@google.com, info@google.com?subject=unsubscribe
  • extraHTML is optional. A leading space is no longer required. Example: title="send email now". If extraHTML is provided, then you must use a total of 4 vertical bar separators, although you may provide blank values for the other parameters.
  • visiblePhrase is optional. When blank, it is set to the targetEMail, without any subject. Example: information
  • asNumeric is optional and defaults to 'false'. Examples: yes, no, true, false. When asNumeric is used, you must provide a total of 3 or 4 vertical bar separators.
There is a corresponding Delphi method: Response.SendMailTo
    procedure SendMailto(const EMailAddress: string; VisiblePhrase: string;
      const ExtraHTML: string; const asNumeric: Boolean);
ucLogFil improved for Unicode and UTF8 strings v2.117
StringWriteToFile and StringAppendToFile, plus their variations, all pass testing now, with AnsiString, UTF8String and UnicodeString content.
Content-Type v2.117
Fixed support for (~SETPROLOGUETYPE|custom,text/html; charset=iso-8859-1~) which had been resulting in 2 Content-Type headers.
UTF-8 support v2.117
For all versions of Delphi, follow advice here about adding accept-content attributes to your FORM tags, namely add this attribute, accept-charset="UTF-8".
For Delphi 2010, compile with WebHub v2.117 to support UTF-8 input (form literals).
There is a FuzRegex script available for this step; see WebHub2116-to-2117_WHTeko in the 2010WebHub folder on www.fuzregex.com.
The OnPageComplete event has gone back and forth, as to whether the page content is passed as UTF-8 or not. We are sticking with UTF8String as of WebHub v2.118 (11-Jun-2010). To save the file to disk, use UTF8StringWriteToFile from ucLogFil.pas. Reference unit whdemo_Extensions.pas for example source code.
For Ansi users (Europe especially) with Non-Unicode Delphi... v2.118
Use the new event, pWebApp.Response.OnEncodeResponse, to convert your page content from your Ansi encoding to UTF8. If you do not, then it will be automatically encoded via the standard UTF8Encode function which uses the default code page for Windows. So, if you need to have your code page taken into consideration (because you are hosting your application on a server in another country), do your own conversion. See ucAnsiUtil.pas for utilities for this.
This is relevant for Delphi 7 to Delphi 2007.
New unit: ucAnsiUtil.pas v2.118
This unit contains functions that European developers may need with WebHub and a non-Unicode version of Delphi, if (and only if) there is a chance that their WebHub EXEs may end up deployed on a hosted server running on Windows with a different default code page.
This unit is part of TPack and WebHub; anyone who needs it (aside from WebHub users) may license it as part of TPack.
INPUTFORM command will set encoding to UTF-8 v2.118
As of WebHub v2.118 (04-June-2010), the INPUTFORM command, which generates the HTML FORM tag, automatically includes the syntax for accept-content being encoded as UTF-8. WebHub will not support alternate encodings for form input until such time as the http protocol itself moves to UTF-16, which may or may not ever happen.
Even European users should not notice any problems with this change because WebHub automatically decodes from UTF8 to string before you see the data in the StringVars array. However, if you are doing any very-low-level manipulation of the input stream, you could see a problem. That is Very Unlikely.
We recommend that you test some of your FORMs with input of accented and foreign characters.
INPUTFORM command includes HTML comments to indicate changing content v2.119
To assist with functional testing, extra comment tags are now generated when you use INPUTFORM and you have set pWebApp.RunningFunctionalTests := True; in any of your Init methods.
To patch this idea into older versions of WebHub, modify your copy of htWebApp.pas, adding a3 := Format('%s', [a3]);
This is the ONLY change to the WebHub Components in v2.119.
ANCHORMODIFY modified v2.118
If you use ANCHORs, great, please test a few of them.
For anyone upgrading old WebHub projects, note that you need to distinguish between ANCHOR and ANCHORMODIFY. The ANCHOR command is now only used to set the name-and-position of an anchor. The ANCHORMODIFY is used to put content into a named position.
Reference: showcase demo, pgEnterShowcase page.
Fixed SendIMGHREF method v2.117
This method is used to generate sequence buttons, as used in the SHOWCASE and JOKE demos. It had been generating incorrect HTML for the a href tag.
Dynamic binary streams confirmed working v2.118
Reference whJPEG.pas unit and http://demos.href.com/jpeg demo.
Unicode v2.118
As of v2.118, the TwhString type has been changed from UTF8String to string. The meaning of string differs based on the Delphi version. In Delphi 2009 and 2010, it means UnicodeString aka WideString.
The TwhtekoString type remains UTF8String, and is used internally and in a very small number of events, primarily those involving the Dreamweaver interface.
The ucString unit in TPack now has UTF8 equivalents for some commonly used functions. You may not need those for WebHub work specifically -- perhaps for other Delphi projects. For example: UTF8Copy, UTF8SplitString, UTF8Length and so on. These UTF8 functions work properly in Unicode and non-Unicode editions of Delphi.
Dreamweaver integration
Remote refresh works in v2.118. Design mode NOT YET TESTED with WebHub v2.118.
NativeXml: cleared compiler warnings v2.118
Delphi 2010 reports no warnings when compiling NativeXml.pas now.
New unit: UTF8StringUtils v2.118
This unit is provided for convenience, while many people still use Delphi 7 ... Delphi 2007 and the world still uses UTF-8 for many, many tasks. It is used by NativeXml, TPack and WebHub.
Known issue: problem with accented characters in email-merge
WebHub v2.118 and v2.119 have a problem when sending some mail-merge emails: when there are accented characters involved and there is an attachment, and the compiler is Delphi-Unicode.
Should be fixed in v2.120; testing 15-June-2010

The Hub, WebHubAdmin, ZMAdmin

Silent Install v2.118
Add command line switch /S with an uppercase-S to make the Runtime Setup install. Recommended only when upgrading, or when you are absolutely sure that you have all required configuration in place.
Hub supports sessionmask v2.112
If you enter a sessionmask such as ##\*.var then the Hub will store the session VAR files in subdirectories. This is recommended for high-traffic sites.
ShutdownWHApps utility v2.113
This utility is now included, in the webhub\bin folder. Previously it was available only upon request. It uses the Hub to ask all running WebHub applications to exit immediately.
Earlier versions shut down the Hub service as well; now the Hub stays running. Use net stop hub to make the Hub stop.
Known issues: hub start, stop
Hub may have trouble stopping in v2.116, v2.117.
Hub may go into an endless loop when starting in v2.117
Resolved in v2.118.
Hub License name must be Ansi using code page #1252 v2.119
This is not a new rule, however, it has now been formalized by using certain functions internally, with code page #1252 hard coded.
To date, all License names have used ASCII up to char 127 only.

WebHub Runners

cgi-bin runner supports binary file uploads v2.111
Previously, the runbin.exe runner only supported plain-text file uploads.
isapi runner avoids warning log message v2.113
The following warning message #10054 is no longer logged (header failure) 10054: An existing connection was forcibly closed by the remote host
This condition happens whenever the client (ie, the browser) disconnects before reading the response.
runisa64.dll custom path remembered during setup v2.118
There had been two problems with the prior installer: it had not displayed any custom location for installing runisa64.dll, and it had not remembered that you wanted to install it. The workaround was: you had to select it each time during installation, and you had to move it from the default location of c:\inetpub\scripts.
SOAP support v2.118
Confirmed that automatically generated documentation is working, 11-June-2010. Reference whStopSpam demo, http://demos.href.com/htun