Recent

Author Topic: fpcgi.Application  (Read 3868 times)

grandbob

  • New member
  • *
  • Posts: 7
fpcgi.Application
« on: November 19, 2009, 10:10:01 am »
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.

Code: [Select]
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.

Code: [Select]
<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?

 

TinyPortal © 2005-2018