#1 Re: mORMot 2 » Regression with RootRedirectToURI » 2025-09-02 07:29:52

In my case i have 6 Server registered in HttpServer and using BoilerplateServer derived from resthttpserver
May be the error was in default options of boilerplate redirecting to index.html...
i changed this 2 things.

#2 Re: mORMot 2 » Regression with RootRedirectToURI » 2025-09-02 07:05:58

Thank you I found the solution: I had to to set AServer.RootRedirectGet which wasn’t required before.

#3 mORMot 2 » Regression with RootRedirectToURI » 2025-09-01 13:14:10

itSDS
Replies: 5

Hi Arnaud,

did you change something with this feature ? atm our base url is not redirected
We use RootRedirectToURI as before ?

best regards

#4 Re: mORMot 2 » Question concerning JSON generation DateTime -> Null » 2025-08-29 07:37:03

One Question where can i set this Option globally ?

#5 Re: mORMot 2 » Question concerning JSON generation DateTime -> Null » 2025-08-29 07:21:30

Looks good, TYVM

one thing: in mormot.ui.pdf the unit   mormot.crypt.other, is missing !

#6 mORMot 2 » Question concerning JSON generation DateTime -> Null » 2025-08-28 12:16:16

itSDS
Replies: 4

Hi Arnaud, since 3Month or so JSON Output write null for TDateTime if Date is 0
Before it wrotes a empty String "" in JSON Output.

Is it possible to enable old Feature OnDemand ?
Because we have old SynCrossplatform Clients throwing exception implicit converting Variant Null to String

For new Clients i added this to SynCrossplatformJSON:

function Iso8601ToDateTime(const Value: Variant): TDateTime; overload;
function Iso8601ToDateTime(const Value: string): TDateTime; overload;

#7 Re: mORMot 2 » Serve multiple hostnames on one IP with separate mORMot binaries » 2025-08-21 11:44:02

there is a solution for iis we use, Install URL Rewrite 2.0 or higher and ARR (Application Request Routing Cache) Work perfekt !

#8 Re: mORMot 2 » Question getting Blob Data RawBlob » 2025-08-14 14:31:05

atm i us a SOA call which gives blob for guid to solve problem

#9 Re: mORMot 2 » Question getting Blob Data RawBlob » 2025-08-14 13:59:59

Yes i can:
Object looks like this:

  TBild = class(TDFDomBase)
  private
    fBildID : TBildBildID;
    fGUID : TBildGUID;
    fBinaerdaten : RawBlob;
  public
    procedure SetBinaerdaten(const ABinaerdaten : RawBlob);
  published
    property BildID: TBildBildID read fBildID;
    property GUID: TBildGUID read fGUID;
    property Binaerdaten : RawBlob read fBinaerdaten;
    property Datenformat : RawUtf8 read fDatenformat;
  end;

SOA Function like this:

function FillBildStreamFromBDS(var ABild : TBild) : TresultRec; 
begin
  var LBinaerdaten : RawBlob;
  Result := GetBildBinaerdaten(ABild.GUID, LBinaerdaten);
  if Result.Erfolgreich then
    ABild.SetBinaerdaten(LBinaerdaten);
end;

In Log Binaerdaten is null but was filled with 4MB PNG before

#10 mORMot 2 » Question getting Blob Data RawBlob » 2025-08-14 09:11:37

itSDS
Replies: 4

Hi Arnaud, i like to get an Object containing a RawBlob Field by SOA Call.
Blob is filled on Server side, but not sent to client, in JSON Blob:null is postet.

Is there an Option to send the Blob Data here ?

#11 Re: mORMot 2 » Cookie not found in new TMvcSessionWithRestServer » 2025-08-14 06:24:21

Thanks, the session cookies are working again now.

#12 mORMot 2 » Cookie not found in new TMvcSessionWithRestServer » 2025-08-07 09:34:48

itSDS
Replies: 2

Hi Arnaud,

after your mvc rework, the Cookies do not work anymore.

In Former Version you set OutCookie and InCookie to the Cookie.
In the New Version only outcookie is set, but InCookieSearch does not find it.

We derived out Application from new TMVCApplicationRest

may be you can solve it.

#13 mORMot 2 » Managed Records not initialized by "CallMethod" » 2025-08-06 09:09:05

itSDS
Replies: 1

Hi Arnaud, im using a managed Record as Result of a SOA function.

result = packed record
  
public
    class operator Initialize(out Dest : result);
end;

// SOA Function:

function Test : result;

if Test is called directly result.Initialize is called
if it is called remote (by mormot.core.interface.CallMethod) result.Initialize is not called and record uninitialized

is it possible to call it ?

#14 mORMot 2 » GetCurrenThreadID in mormot.core.base undefined » 2025-07-30 10:14:47

itSDS
Replies: 1

Hi Arnaud,

added uses mormot.core.os to mormot.core.base to prevent compiler Error

#15 Re: mORMot 2 » RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode » 2025-07-21 10:31:07

itSDS wrote:

Hi Arnaud, via ChatGPT i found this and it seems to help:

In Registry:
HKEY_CURRENT_USER\Software\Embarcadero\BDS\22.0\Debugging

Add EnableWaitChainDetection as DWORD with value 0

it disables the Thread Wait Chain Feature from Delphi.

Sry today long wait times, did not fix the problem - I investigate further

#16 Re: mORMot 2 » RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode » 2025-07-18 09:37:49

Hi Arnaud, via ChatGPT i found this and it seems to help:

In Registry:
HKEY_CURRENT_USER\Software\Embarcadero\BDS\22.0\Debugging

Add EnableWaitChainDetection as DWORD with value 0

it disables the Thread Wait Chain Feature from Delphi.

#17 Re: mORMot 2 » RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode » 2025-07-17 17:23:18

Without it runs as the 32Bit Version
Yes there must something the Debugger does what the exe dont like, but i dont know what

#18 Re: mORMot 2 » RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode » 2025-07-17 10:44:27

After a long time i had to debug my m2 service with 64Bit again today.

and there is a delay of 55s at the moment. Starting Service in RS 12.3 64Bit Debugger

https://imgtr.ee/image/image.SE1M

Using the 32Bit exe with RS 12.3 Debugger it only takes 1s at the same function

Int the Picture there is a gap in the log at 12:14:12.528 -> 12.15.02.944 of 50s I don't know what the programm does at this point ???

#19 Re: mORMot 2 » regression in logging » 2025-07-14 09:28:38

Ty arnaud, i'll try it
i made this serious observation running a lengthy prozess:

https://imgtr.ee/image/image.SDgW

at 23:00 many small log files are created

    TSynLog.Family.RotateFileDailyAtHour := ServiceManager.EinstellungenManager.ReadInteger(cRotateFileDailyAtHour, 23);

may be it depends ot the rotatefiledailyathour, but i think that the log shoult not create that many files, because older logs are overwritten (lost) then.

#20 Re: mORMot 2 » Problem senden Enum - Value » 2025-07-08 08:23:42

Hi i found the Error

My Enum is like this:
TEinheitEnum = (
first,
second,
third,
fourth
);

in class constructor i set member fEinheit to "third" (Because i like it initialized with third value) The Enum is kind of sorted smile
Now in client its set to "first"

if its set to first, the value is missing in JSON - Data send to server (as you said its optimized)
Because of this the expected Value is not sent to server.

As Solution i put my desired default value in top of enum
enum is now : (third, first, second, fourth)
It does not look good, but it works now.

#21 Re: mORMot 2 » Problem senden Enum - Value » 2025-07-07 19:47:40

Hm what previous Value do you mean. I only change 1 Value in Object then put whole Objekt to soa call ?
All members are transfered except the enum one.

On Server Site a wrong value is in that enum field.

#22 Re: mORMot 2 » regression in logging » 2025-07-07 14:26:59

Hi Arnaud,

i have the same problem in
TRestServerUriContext.InternalExecuteSoaByInterface

Here you call DoLog and DoLog cuts the the received string, is it possible to add something like LogResponseMaxBytes here ?
Else i have to look at client Log what's send and this is not possible in many times.

#23 Re: mORMot 2 » Problem senden Enum - Value » 2025-07-07 14:12:37

it is not a generell problem, sending other Object containing enum value works as expected...

#24 mORMot 2 » Problem senden Enum - Value » 2025-07-07 14:08:02

itSDS
Replies: 6

Hi Arnaud, im sending objects with soa call to server.
This Object contains a enum

published
property Einheit : TEinheitEnum read fEinheit

the Value Einheit is not contained in the JSON send to m2 Server, Einheit on Server is uninitialized
i checked ctxt on client an not Entry for Einheit.

What can i do ?

#25 Re: mORMot 2 » mORMot 2 support Delphi Mobile compiler ? » 2025-06-27 09:12:51

ab wrote:
itSDS wrote:

i think no one will make a server on mobile platform.

Our "peer cache" feature relies on local UDP/TCP servers, and could benefit on client side too, but I don't know how it is possible on the mobile, especially about firewall port opening.
smile
I would think about a "pure client" peercache feature, without any UDP/TCP server.

I used http server on mobile a time ago and did not have to open any port but may this changed meanwhile

#26 Re: mORMot 2 » mORMot 2 support Delphi Mobile compiler ? » 2025-06-25 07:17:38

I too asked this question long time ago wink and actually using SynCrossPlatform Client with some Patches. It works generally great.

The Problem is that you have to generate special Client.pas Unit from Server. And it would be great if this step can be removed.
for the iOS/Android it is not neccessary to port the whole m2. only the client stuff and rtti because i think no one will make a server on mobile platform.

#27 Re: mORMot 2 » regression in logging » 2025-06-24 19:11:23

Ty Arnaud it solves my problem

#28 Re: mORMot 2 » regression in logging » 2025-06-10 11:50:40

Hi Arnaud, ty for your patch.

Today we wanted to see the Result of a SOA Call in Log. In former Versions there was the complete JSON Array.
In the new m2 there is only 1 line saying Response with 1.7MB

Is it possible to add the complete JSON to Log again. We need it to debug problems. Log Size and Performance does not matter in our case ! More important is to log the Information.
A switch to enable / Disable Big Data would be ok too.

#29 Re: mORMot 2 » regression in logging » 2025-05-16 08:41:46

As Workaround i changed:

procedure TRest.InternalLogResponse(const aContent: RawByteString;
  const aContext: shortstring; Level: TSynLogLevel);
begin // caller checked that self<>nil and sllServiceReturn in fLogLevel
//  fLogFamily.Add.LogEscape(Level, '%', [aContext], pointer(aContent), length(aContent), self);
  fLogFamily.Add.Log(Level, aContent, self, MAX_SIZE_RESPONSE_LOG);
end;

#30 mORMot 2 » regression in logging » 2025-05-16 08:27:39

itSDS
Replies: 9

Hi Arnaud,

today i saw that some SOA Parameters i formerly could read are shortened now.
There was a const MAX_SIZE_RESPONSE_LOG which i changed to a larger Value

now this const is not used any more and at the places it was formerly used InternalLogResponse is called!
InterlogResponse uses LogEscape which uses a ShortString now an cuts all after 200 Char.

This is not very useful.

#31 Re: mORMot 2 » Simple Question for new DoLog/Enter » 2025-05-15 09:19:17

TY Daniel, this makes sense if you like to add something else to the Log.
My Question was concerning the Use of the Cast to PUtf8Char

#32 mORMot 2 » Simple Question for new DoLog/Enter » 2025-05-13 08:26:21

itSDS
Replies: 4

Hi Arnaud i have a may be stupid question how to handle your Change in TSynLog.DoLog/Enter in our Programs

you changed one Parameter from RawUtf8 to PUtf8Char

what is the best way to fix the Compiler Errors:

Sample 1:

old:
var XYZ: String := 'test'; // Sometimes we got String Var
TSynLog.Enter(StringToUtf8(XYZ), ...);
new:
TSynLog.Enter(PUtf8Char(StringToUtf8(XYZ)), ...);  // is this the best way ?

Im not sure what this cast really does smile

#34 Re: mORMot 2 » Security Problem with Session Cookie » 2025-04-16 10:02:51

Hi As BUGFix i commented the Lines 1539-1541 in mormot.rest.mvc

  result := fContext.Validate(
    cookie, PRecordData, PRecordTypeInfo, PExpires, nil, Invalidate);
//  if result <= 0 then
//    // delete any invalid/expired cookie on server side
//    Finalize;
end;

#35 Re: mORMot 2 » Security Problem with Session Cookie » 2025-04-16 09:11:50

ab wrote:

Please try with tonight's code.

It should keep track of the finalized sessions, and reject them.
I also switched the cookie signature and encryption to AES-GCM-128 which is both very fast and cryptographically secure.
As far as I can tell, there is no advantage of using a JWT in respect to our TBinaryCookieGenerator now.

Hi Arnaud, sorry i testet wrong. The Problem was not solved correctly.
I didn't provide function for fApplication.OnSessionFinalized so invalidate was not called.

But if i provide function there is an Stack Overflow generated because finalize is called recursive.

#36 Re: mORMot 2 » Question: Modifying OutCustomHeaders in GetViewInfo ? » 2025-03-21 09:22:53

I think both Variants are to complicated. I genereate ContentSecurityPolicy in GetViewInfo which generates 2 Nonce Values for script and style
This both values i give to mustache {{main.cspnonce}}

if i use callback it is called after mvc, how could i add my nonces to main.xy ?
if i use ttomas version i have to add my code to every function, i have a lot

To make it easy, i made a little patch to TRestUriParams and added a new value: ContentSecurityPolicy

   LowLevelUserAgent: RawUtf8;
    /// itSDS: für ContentSecurityPolicy !
    ContentSecurityPolicy: RawUtf8; // itSDS
    /// initialize the non RawUtf8 values
    procedure Init; overload;

Then i added a little bit of code to mormot.rest.http.server.pas

  call.LowLevelUserAgent := Ctxt.UserAgent;
  call.ContentSecurityPolicy := ''; // itSDS
  if fHosts.Count > 0 then
  Ctxt.OutCustomHeaders := call.OutHead;

  if call.ContentSecurityPolicy <> '' then // itSDS
    Ctxt.AddOutHeader(['Content-Security-Policy: ', call.ContentSecurityPolicy]);

  if call.OutInternalState <> 0 then

what do you think ?

#38 mORMot 2 » Question: Modifying OutCustomHeaders in GetViewInfo ? » 2025-03-20 19:26:16

itSDS
Replies: 5

Hi Arnaud, i like to add a different nonce for CSP to every call of GetViewInfo
Acually I put my CSP to OutCustomHeaders in HttpServer Request.

is it Possible to Access / Modify the Ctxt.OutCustomHeaders from MVCApplication ?

Thank you

#39 mORMot 2 » RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode » 2025-03-19 11:19:19

itSDS
Replies: 7

I Start Service compiled for 64Bit in Debug Mode, it seems to hang, but in Log i can see that ComputeRoutes takes 99s to start.
Starting same Service from Command Line starts immediate as expected.

i saw thsi Problem before but not taking so long...

#40 Re: mORMot 2 » Delphi 12.3 doing timeout error starting server » 2025-03-19 11:00:56

Sry i must correct me, I changed above line without effect. Make new Ticket for my problem

#41 Re: mORMot 2 » Bug with Log To SynLz » 2025-03-19 10:15:23

After disabling the AntiVirus, the Problem does not happen again, may there was a problem with the AV ?!

#42 Re: mORMot 2 » Missing function NetConcat » 2025-03-19 10:12:20

I think you renamed it to mormot.core.base.concat

#43 mORMot 2 » Missing function NetConcat » 2025-03-19 10:03:53

itSDS
Replies: 2

Hi Arnaud, in latest version NetConcat is missing in mormot.net.http.pas

#44 Re: mORMot 2 » Security Problem with Session Cookie » 2025-03-19 09:45:06

There was one thing, happened to me smile
I changed CookieName to "DIT Test" and later got error in Reverse Proxy:

  Description
  This violation occurs when HTTP cookies contain at least one of the following components:
  - Quotation marks in the cookie name.
  - A space in the cookie name.
  - An equal sign (=) in the cookie name.
  Note: A space between the cookie name and the equal sign (=), and between the equal sign (=) and cookie value is allowed.
  - An equal sign (=) before the cookie name.
  - A carriage return (hexadecimal value of 0xd) in the cookie name.

may be there should be a Check-Routine in SetCookieName throwing Exception if name does not match the rules für Cookie Names smile

#45 Re: mORMot 2 » Security Problem with Session Cookie » 2025-03-19 09:38:13

Hi Arnaud i testet it today an it seems to be secure now, could not use deletet Cookie any more.

#47 mORMot 2 » How Get RemoteIP correctly ? » 2025-03-17 18:36:57

itSDS
Replies: 1

Hi Arnaud,

i try to get RemoteIP in MVC Server.
I set RemoteIPServer either to X-Real-IP or X-Forwarded-For.

But how can i access/Request RemoteIP from function in MVC-Server ?

i tried it this way:

function TMyMVCApplication.GetCallerIPAdresse: RawUtf8;
begin
  Result := FindIniNameValue(pointer(ServiceRunningContext.Request.Call.InHead), 'REMOTEIP: ');
  if Length(Result) = 0 then
    Result := ServiceRunningContext.Request.Call.LowLevelRemoteIP;
  if Length(Result) = 0 then
    Result := '127.0.0.1';
end;

But RemoteIP is empty

Thank you

#48 Re: mORMot 2 » Bug with Log To SynLz » 2025-03-13 19:05:54

I was just looking fpr a reason, that the Log Files behave the described way.
The Problem is, if the BUG occurs, the Service seems to hang for the connected clients

#49 Re: mORMot 2 » Bug with Log To SynLz » 2025-03-13 11:32:11

Hi Arnaud, today we had this Problem again, consuming also a lot of cpu cycles in the service with the Log - Problem.

I found out, that on the server running the logs, Microsoft defender was scanning the logs.
Is this a possible Reason for the Problem?
I deaktivated the Defender - Scan for our Log/Service directories.

I will report if Problem has gone or not

Board footer

Powered by FluxBB