You are not logged in.
Pages: 1
Hi,
mORMotHttpServer library has been used in my HttpServer application. I’ve a problem with response which includes simple quote char in string (“). The server is making json from string and forwards as string to the client. For example:
The server (based on Project14Server.dpr):
I’ve added function TestQuotedString:
function TServiceCalculator.TestQuotedString: string;
begin
Result := 'ABC';// OK
Result := 'A\"B\"C';// Wrong
end;
and I call this in client:
lblResult.Caption := I.TestQuotedString;
Exception occurred after calling TestQuotedString method.
What is wrong?
Regards
Darek
Offline
I tried to reproduce it, with latest version from trunk - http://synopse.info/fossil/timeline
No problem when calling this method:
function TServiceCalculator.ToString: string;
begin
result := 'A\"B\"C';
end;
The client application receives 'A\"B\"C', just as expected:
if Client.Services['Calculator'].Get(I) then begin
lblResult.Caption := IntToStr(I.Add(a,b));
lblABC.Caption := I.ToString;
end;
I've customized Project14ServerHttp.dpr and Project14Client.dpr
Offline
When I upgraded the files to the latest version everything works fine.
Thank You a lot.
Offline
Pages: 1