1313 // engine components
1414 RALSynopseServer, RALIndyServer, RALfpHTTPServer, RALSaguiServer,
1515 // general base components
16- RALServer, RALRequest, RALResponse, RALConsts;
16+ RALServer, RALRequest, RALResponse, RALConsts, RALMIMETypes, RALCompress ;
1717
1818type
1919
@@ -47,7 +47,7 @@ TRALApplication = class(TCustomApplication)
4747
4848 procedure TRALApplication.Ping (Request: TRALRequest; Response: TRALResponse);
4949 begin
50- Response.Answer(200 , ' pong' );
50+ Response.Answer(HTTP_OK , ' pong' , rctTEXTPLAIN );
5151 end ;
5252
5353 constructor TRALApplication.Create(AOwner: TComponent);
@@ -59,6 +59,9 @@ TRALApplication = class(TCustomApplication)
5959 StopOnException := True;
6060
6161 WriteLn(' RAL TestServer Lazarus - v' + RALVERSION);
62+ { $IFOPT D+}
63+ WriteLn(' Debug Enabled' );
64+ { $ENDIF}
6265 WriteLn(' Choose the engine:' );
6366 WriteLn(' 1 - Synopse mORMot2 ' + SYNOPSE_FRAMEWORK_VERSION);
6467 WriteLn(' 2 - Indy ' + gsIdVersion);
@@ -73,13 +76,17 @@ TRALApplication = class(TCustomApplication)
7376 4 : begin
7477 FServer := TRALSaguiServer.Create(nil );
7578 TRALSaguiServer(FServer).LibPath := ExtractFilePath(ParamStr(0 )) + SG_LIB_NAME;
79+ { $IFOPT D+}
80+ WriteLn(TRALSaguiServer(FServer).LibPath);
81+ { $ENDIF}
7682 end ;
7783 end ;
7884 WriteLn(' Type the port used by server (0 for default 8000)' );
7985 ReadLn(port);
8086 if port <= 0 then port := 8000 ;
8187 FServer.Port := port;
8288 FServer.CreateRoute(' ping' , @Ping);
89+ FServer.CompressType := ctNone;
8390 FServer.Start;
8491 end ;
8592
0 commit comments