While surfing thru the fcl-web sources, I notice that fpcgi.Application exposes several [vestigial?] methods. This report illustrates my attempt to invoke two of these methods.
program dcs;
{$mode objfpc}{$H+}
uses
fpWeb,fpCGI, dcsUnit, sysutils;
begin
Application.Title:='cgiproject1';
Application.Initialize;
Application.CreateForm(TDCSWebModule, DCSWebModule);
{***} Application.ShowException(Exception.Create('Corn mixed up with the lemon juice!'));
Application.Run;
{***} Application.AddResponseLn('Mischievous stuff')
end.
This is what we get in the browser.
<html>
(correct output omitted here)
</html>
An unhandled exception occurred at $000000000048509D :
EAccessViolation : Access violation
$000000000048509D line 1493 of ../../../../../usr/lib/fpc/2.2.2/units/x86_64-linux/fcl-web/httpdefs.pp
$00000000004A0FF1 line 237 of ../../../../../usr/lib/fpc/2exception at 0000000000000000:
Corn mixed up with the lemon juice!.
.2.2/units/x86_64-linux/fcl-web/custcgi.pp
$00000000004A120D line 250 of ../../../../../usr/lib/fpc/2.2.2/units/x86_64-linux/fcl-web/custcgi.pp
$000000000041B573 line 14 of dcs.lpr
I presume fpcgi.Application is not meant to be this way. Shall I report this as a defect?