summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-27 11:16:58 +0000
committermichael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-27 11:16:58 +0000
commit64aefccc4c413f011e7d62ed717c8d69286b809a (patch)
treea44cbcacd836f0958661615f7310125dd3d60156
parentb1887675b62350c6180672a934da4d531b699a93 (diff)
downloadfpc-64aefccc4c413f011e7d62ed717c8d69286b809a.tar.gz
* Make some properties public
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49276 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--packages/fcl-web/src/base/custhttpapp.pp14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/fcl-web/src/base/custhttpapp.pp b/packages/fcl-web/src/base/custhttpapp.pp
index 58bb5a6842..b196db160e 100644
--- a/packages/fcl-web/src/base/custhttpapp.pp
+++ b/packages/fcl-web/src/base/custhttpapp.pp
@@ -76,7 +76,6 @@ Type
Procedure InitResponse(AResponse : TResponse); override;
function WaitForRequest(out ARequest : TRequest; out AResponse : TResponse) : boolean; override;
Function CreateServer : TEmbeddedHttpServer; virtual;
- Property HTTPServer : TEmbeddedHttpServer Read FServer;
Public
Procedure Run; override;
Procedure Terminate; override;
@@ -104,6 +103,8 @@ Type
Property UseSSL : Boolean Read GetUseSSL Write SetUseSSL;
// HostName to use when using SSL
Property HostName : String Read GetHostName Write SetHostName;
+ // Access to server so you can set certificate data
+ Property HTTPServer : TEmbeddedHttpServer Read FServer;
end;
{ TCustomHTTPApplication }
@@ -111,6 +112,7 @@ Type
TCustomHTTPApplication = Class(TCustomWebApplication)
private
procedure FakeConnect;
+ function GetCertificateData: TCertificateData;
function GetHostName: String;
function GetIdle: TNotifyEvent;
function GetIDleTimeOut: Cardinal;
@@ -133,9 +135,10 @@ Type
procedure SetUseSSL(AValue: Boolean);
protected
function InitializeWebHandler: TWebHandler; override;
- Function HTTPHandler : TFPHTTPServerHandler;
Public
procedure Terminate; override;
+ // Access to HTTP handler
+ Function HTTPHandler : TFPHTTPServerHandler;
Property Address : string Read GetAddress Write SetAddress;
Property Port : Word Read GetPort Write SetPort Default 80;
// Max connections on queue (for Listen call)
@@ -154,6 +157,8 @@ Type
Property UseSSL : Boolean Read GetUseSSL Write SetUseSSL;
// Hostname to use when using SSL
Property HostName : String Read GetHostName Write SetHostName;
+ // Access to certificate data
+ Property CertificateData : TCertificateData Read GetCertificateData;
end;
@@ -296,6 +301,11 @@ begin
end
end;
+function TCustomHTTPApplication.GetCertificateData: TCertificateData;
+begin
+ Result:=HTTPHandler.HTTPServer.CertificateData;
+end;
+
function TCustomHTTPApplication.GetHostName: String;
begin
Result:=HTTPHandler.HostName;