You are not logged in.
1. I found this in the code:
// WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 and WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 // are unsafe, disabled at Windows level, therefore never supplied
1、sometimes the server i want to access applies the unsafe PROTOCOL i have to accord to.
2、with https WINHTTP used to be complex in different windows version, so in mormot.defines.inc file,
i define FORCE_OPENSSL and take libssl-3-x64.dll and libcrypto-3-x64.dll together.
{$define FORCE_OPENSSL}
3、usually it is ok, but some other time it is not enough, perhaps the dependence is needed,
for instance VC_redist with related version.
i got similar error before, after i modified code in file mormot.net.client.pas as follow, now it works:
function TWinHttp.InternalGetProtocols: cardinal;
...
result := WINHTTP_FLAG_SECURE_PROTOCOL_TLS1;
...
modified to:
function TWinHttp.InternalGetProtocols: cardinal;
...
result := WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 or
WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 or
WINHTTP_FLAG_SECURE_PROTOCOL_SSL3;
...
if dstOrm.ID > 0 then
tmpUpdBatch.Update(dstOrm)
else
tmpAddBatch.Add(dstORM, true);
try it as follow:
if dstOrm.ID > 0 then
tmpAddBatch.Delete(dstOrm.IDValue);
tmpAddBatch.Add(dstORM, true);
uses LConvEncoding, and try CP936ToUTF8 or UTF8ToCP936.
after change the field delfinition in TOrm to NullableUtf8text, it worked.
Thanks again!
thanks, i will try it.
Hi ab, i got the following code:
var
lbatch: TRestBatch;
lrec: TOrm;
...
begin
lbatch := TRestBatch.Create(DBServer.Orm,
DBModel.Table[ltblname],10000,
[boInsertOrReplace,boExtendedJson]);
lrec := DBModel.Table[ltblname].CreateAndFillPrepare(ajson);
lrec.FillRewind;
while lRec.FillOne do
begin
lrtn := lbatch.Add(lrec,true,true);
......
some field values in ajson are nulls, but after execute as follow:
lrtn := DBServer.Orm.BatchSend(lbatch);
filed values in sqlite become emtpy string or zero depends on its type.
how to keep the null values into the sqlite?
Thank you very much!
thanks to ab and Alfred, i cross compiled my project with mormot1.8 using fpcupdeluxe AARch64 cross compiler under windows 11, it worked fine for months.
i also compiled it with mormot2 using fpcupdeluxe AARch64 cross compiler under windows 11, it worked also.
install fpcupdeluxe on my Raspberry Pi 4, compile it again and it also works.
the key is that i should use free pascal version 3.2.2 and lazarus 2.2.0, higher version will produce kinds of errors which are of my own codes.
thanks to you two again!
Please follow the forum rules and don't post code here in the forum.
sorry about that.
already got to run, thanks again!
hi, ab:
is it possibly to change TSqlDataBase.LockJson in mormot.db.raw.sqlite3.pas code as follow:
from:
fSafe.Lock; // cache access is also protected by fSafe
try
if IsCacheable(aSql) then
begin
result := fCache.Find(aSql, aResultCount); // try to get JSON result from cache
if result <> '' then
begin
if fLog <> nil then
begin
fLog.Add.Log(sllSQL, 'from cache % %', [FileNameWithoutPath, aSql], self);
fLog.Add.Log(sllResult, result, self, fLogResultMaximumSize);
end;
fSafe.UnLock; // found in cache -> leave critical section <-------- from here
end;
end
else
begin
// UPDATE, INSERT or any non SELECT statement
CacheFlush;
result := '';
end;
except
...;
end;
to
fSafe.Lock; // cache access is also protected by fSafe
try
if IsCacheable(aSql) then
begin
result := fCache.Find(aSql, aResultCount); // try to get JSON result from cache
if result <> '' then
begin
if fLog <> nil then
begin
fLog.Add.Log(sllSQL, 'from cache % %', [FileNameWithoutPath, aSql], self);
fLog.Add.Log(sllResult, result, self, fLogResultMaximumSize);
end;
end;
end
else
begin
// UPDATE, INSERT or any non SELECT statement
CacheFlush;
result := '';
end;
except
...;
end;
fSafe.UnLock; // found in cache -> leave critical section <------- to here
thanks for your great job!
Excellent! great work ab as always!
i used SQLite3 version 3.33.0 without dll.
in TSQLRequest.FieldsToJSON procedure, sqlite3.column_int64(Request,i) and sqlite3.column_text(Request,i) can get correct values,
procedure TSQLRequest.FieldsToJSON(WR: TJSONWriter; DoNotFetchBlobs: boolean);
var i: integer;
begin
......
SQLITE_NULL:
WR.AddShort('null'); // returned also for ""
SQLITE_INTEGER:
WR.Add(sqlite3.column_int64(Request,i)); <----perhaps Add? each sqlite3.column_int64(Request,i) is very correct
SQLITE_FLOAT:
WR.AddDouble(sqlite3.column_double(Request,i));
SQLITE_TEXT: begin
WR.Add('"');
WR.AddJSONEscape(sqlite3.column_text(Request,i),0); <----perhaps AddJSONEscape? each sqlite3.column_text(Request,i) is very correct
WR.Add('"');
end;
end; // case ColTypes[]
WR.Add(',');
end;
......
end;
i just tried 1.18.6152, the issue remained.
i used 1.18.6150, and i will try 1.18.6152.
hi,ab:
1. i call as follow under win10 with delphi10.4, it worked correct at all .
rtnjson := mySQLRestServerDB.DB.ExecuteJSON(asql,true,@rc);
2. the same call above under win10 with lazarus1.9, it worked correct when i fetch less than about 100 records.
3. the same call above under win10 with lazarus1.9, it worked discorrect when i fetch more than about 100 or 500 records. the issue in the return json is about like that:
..."recommand":0null,"recommand_unit":...
or
...,"sex":1,"subjection":500111,"0000","rootc":"500100",...
or other unusual pattern
4. i debugged in TSQLRequest.FieldsToJSON, everything in "Request" is correct.
thank you very much!
@ab, AOG:
after recompiled sqlite3.c and ecc.c with -fPIC option, it worked.
thanks to both of you!
@ab, thanks, and I will try later.
is it possible that static/x86_64-linux/sqlite3.o and static/x86_64-linux/ecclin64O2.o should be compiled with -fPIC option?
thanks!
-Cg is the same as -fPIC,
i got the same error message with -Cg- in the custom options.
i got the linking error as follow when built the shared library, and it worked correct if i bulit the executive program directly.
Verbose: linker: /usr/bin/ld: mORMot/static/x86_64-linux/sqlite3.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
Verbose: linker: /usr/bin/ld: mORMot/static/x86_64-linux/ecclin64O2.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
thanks!
@ab, AOG:
yes, mORMot is source-first, so i gave up TDataModule and with fpcunit.TTestCase instead, it works.
many thanks!
@AOG, thanks, it seems to be ok. and i will practice it in my project and reply the message later.
Yes, it is a tiresome question about Lazarus/FPC, and i manage to avoid using TDataModule.
Is there any alternative? I have some components and predefined functions/procedures in it.
thanks.
sorry for the topic not related to mORMot.
i have a server with mORMot using Delphi 10.3.3 under Windwos Server for years , thanks for ab and the great team.
i create another server also with mORMot using Lazaris 1.9.0. under CentOS 7, i put TDataModule in DLL, it raised exception,
"Failed to initialize component class "TDataModule1": No streaming method available."
here is the code:
library mydll;
{$mode objfpc}{$H+}
Uses
fastMM4,
{$IFDEF UNIX}
cthreads,
{$ENDIF}
classes, Sysutils, lcl;
type
TDataModule1 = class(TDataModule)
private
public
end;
var
sl:TStringlist;
DataModule1: TDataModule1;
begin
sl:=TStringlist.Create;
try
DataModule1:= TDataModule1.create(nil); <--error
except on e:exception do begin
sl.Add('2:' + e.Message);
sl.SaveToFile('c:\sl.txt');
end;
end;
DataModule1.free;
sl.free;
end.
thanks for help.
@ab, thanks, and you are my hero.
@mpv, how to disable urlencode of sPath?
thanks!
@ab and mpv,
i used Paralles Virtual Machine, and just changed the network adapter configure,it works now.
thanks a lot for your time.
i am not good at Linux.
i compiled and executed "04 - HTTP Client-Server" successful on CentOS 7(64) about six month ago, but this time it does not work.
so i think the error is not about mORMOt or pascal, or it is about CentOS permissions, and i missed something.
thanks, mpv
i changed the port to 1234, and run:
firewall-cmd --permanent --add-port=1234/tcp
firewall-cmd --reload
it did not work.
i debugged "04 - HTTP Client-Server" and got the messages as follow:
Exception class "ECrtSocket" at $00000000009E4F03 with message "OpenBind(0.0.0.0:8080,bind): CallServer=-1 99 [Cannot assign requested address]"
thanks for your quick reply,ab.
i used newpascal and Lazarus trunk.
i also used the latest mORMot and SQLite3fpc files, and compiled with no error.
i think the error is not about mORMOt or pascal,perhaps it is about CentOS permissions,I have no idea.
i will reinstall CentOS and try it again.
thanks again.
i have a server with mORMot running on Windows Server 2008, and it is stable and fast, many thanks to ab for the great work.
recently i would like to create a server running on CentOS7, i complied "04 - HTTP Client-Server" and changed Project04Server
permissions to "read and write", when i executed it,it raised "access violation" error.
i debugged it and found the breakpoint at "TSQLHttpServer.Create", maybe i missed something?
thanks!
Great work @mpv and ab, many thanks !!!
i am waiting for a THttpWebSocketServer of poll/epoll version under Unix/Linux...
every thing is ok whern i change TSQLHttpServer to THttpApiServer.
thanks,
i have a fast and stable RestServer using THttpApiServer for years, many thanks for you for the great mORMot framework.
i am thinking about to use one server and one port(perhaps,80) to provide RestServer and Websocket functions, for Websocket is a good choice for realtime chat,but THttpApiServer can not upgrade with WebSockets, so i think about to use TSQLHttpServer.
start a server using TSQLHttpServer with RestServer and Websocket is ok, but when client access the server:
1. running c:\ab32.exe -n 2 -c 1 http://127.0.0.1/echo.htm, Time per request is 5002.999 [ms] (mean), very solw.
2. i used TSQLRestClientURI to call CallBackPut, when posted data more than 8k, then the call.inbody at the server side will be different from the data sent by the client,when posted data is just one short line,everything is ok.
Best Regards.
@ab,
i used TSQLHttpServer to server as RestServer and WebSocket Server with the same port at the same time:
1. when three or four clients connected the server, the server responsed very slow.
2. if client posted data more than 8k, then the call.inbody at the server side will be different from the data sent by the client.
3. when i used THttpApiServer, everything is ok.
Best Regards.
@ab,
Delphi-Cross-Socket: https://github.com/winddriver/Delphi-Cross-Socket
thanks, and it works now.
it stoped at TSQLModelRecordProperties.Create of mORMot.pas.
constructor TSQLModelRecordProperties.Create(aModel: TSQLModel;
aTable: TSQLRecordClass; aKind: TSQLRecordVirtualKind);
var f: integer;
...
fProps := aTable.RecordProps; <------------------stoped here.
...
i have a TSQLRecord defined as follow:
Ttjxx = class(TSQLRecord)
private
fpid:integer;
fKSH:RawUTF8;
fTJXH: RawUTF8;
fJWBSBZ:RawUTF8;
fJWBS: RawUTF8;
fYK_LYSLY:currency;
fYK_LYSLZ: currency;
fYK_JZSLY:currency;
fYK_JZSLZ: currency;
fYK_JZDSY:currency;
fYK_JZDSZ: currency;
fYK_SJJC:RawUTF8;
fYK_SJJCT: RawUTF8;
fYK_SJDS1:RawUTF8;
fYK_SJDS2: RawUTF8;
fYK_SJDS3:RawUTF8;
fYK_SJDS4: RawUTF8;
fYK_SJDS5:RawUTF8;
fYK_YSYJ: RawUTF8;
fYK_YB: RawUTF8;
fNK_XYSSY: currency;
fNK_XYSZY:currency;
fNK_FYQK: RawUTF8;
fNK_XZJXG:RawUTF8;
fNK_HXXT: RawUTF8;
fNK_SJXT: RawUTF8;
fNK_G: currency;
fNK_GXZ: RawUTF8;
fNK_P: currency;
fNK_PXZ:RawUTF8;
fNK_YSYJ: RawUTF8;
fNK_QT: RawUTF8;
fWK_SG: currency;
fWK_TZ: currency;
fWK_PF: RawUTF8;
fWK_MB:RawUTF8;
fWK_JB: RawUTF8;
fWK_JZ: RawUTF8;
fWK_SZ: RawUTF8;
fWK_GJ:RawUTF8;
fWK_YSYJ: RawUTF8;
fWK_QT: RawUTF8;
fEB_ZETL: currency;
fEB_YETL: currency;
fEB_XJ: RawUTF8;
fEB_YSYJ:RawUTF8;
fEB_EBYH: RawUTF8;
fKQ_CE: RawUTF8;
fKQ_SFKC: RawUTF8;
fKQ_YC:RawUTF8;
fKQ_YSYJ: RawUTF8;
fKQ_QT: RawUTF8;
fXT: RawUTF8;
fXT_YSYJ:RawUTF8;
fXT_QT: RawUTF8;
fGG_ZAM: RawUTF8;
fGG_YGKY: RawUTF8;
fGG_YSYJ:RawUTF8;
fGG_QT: RawUTF8;
fZYSXDM1: RawUTF8;
fZYSXDM2: RawUTF8;
fZYSXDM3:RawUTF8;
fZYSXDM4: RawUTF8;
fZYSXDM5: RawUTF8;
fZYSXDM6: RawUTF8;
fTJJLDM:RawUTF8;
fBZ: RawUTF8;
published
property pid: integer read fpid write fpid;
property KSH: RawUTF8 read fKSH write fKSH;
property TJXH: RawUTF8 read fTJXH write fTJXH;
property JWBSBZ: RawUTF8 read fJWBSBZ write fJWBSBZ;
property JWBS: RawUTF8 read fJWBS write fJWBS;
property YK_LYSLY: currency read fYK_LYSLY write fYK_LYSLY;
property YK_LYSLZ: currency read fYK_LYSLZ write fYK_LYSLZ;
property YK_JZSLY: currency read fYK_JZSLY write fYK_JZSLY;
property YK_JZSLZ: currency read fYK_JZSLZ write fYK_JZSLZ;
property YK_JZDSY: currency read fYK_JZDSY write fYK_JZDSY;
property YK_JZDSZ: currency read fYK_JZDSZ write fYK_JZDSZ;
property YK_SJJC: RawUTF8 read fYK_SJJC write fYK_SJJC;
property YK_SJJCT: RawUTF8 read fYK_SJJCT write fYK_SJJCT;
property YK_SJDS1: RawUTF8 read fYK_SJDS1 write fYK_SJDS1;
property YK_SJDS2: RawUTF8 read fYK_SJDS2 write fYK_SJDS2;
property YK_SJDS3: RawUTF8 read fYK_SJDS3 write fYK_SJDS3;
property YK_SJDS4: RawUTF8 read fYK_SJDS4 write fYK_SJDS4;
property YK_SJDS5: RawUTF8 read fYK_SJDS5 write fYK_SJDS5;
property YK_YSYJ: RawUTF8 read fYK_YSYJ write fYK_YSYJ;
property YK_YB: RawUTF8 read fYK_YB write fYK_YB;
property NK_XYSSY: currency read fNK_XYSSY write fNK_XYSSY;
property NK_XYSZY: currency read fNK_XYSZY write fNK_XYSZY;
property NK_FYQK: RawUTF8 read fNK_FYQK write fNK_FYQK;
property NK_XZJXG: RawUTF8 read fNK_XZJXG write fNK_XZJXG;
property NK_HXXT: RawUTF8 read fNK_HXXT write fNK_HXXT;
property NK_SJXT: RawUTF8 read fNK_SJXT write fNK_SJXT;
property NK_G: currency read fNK_G write fNK_G;
property NK_GXZ: RawUTF8 read fNK_GXZ write fNK_GXZ;
property NK_P: currency read fNK_P write fNK_P;
property NK_PXZ: RawUTF8 read fNK_PXZ write fNK_PXZ;
property NK_YSYJ: RawUTF8 read fNK_YSYJ write fNK_YSYJ;
property NK_QT: RawUTF8 read fNK_QT write fNK_QT;
property WK_SG: currency read fWK_SG write fWK_SG;
property WK_TZ: currency read fWK_TZ write fWK_TZ;
property WK_PF: RawUTF8 read fWK_PF write fWK_PF;
property WK_MB: RawUTF8 read fWK_MB write fWK_MB;
property WK_JB: RawUTF8 read fWK_JB write fWK_JB;
property WK_JZ: RawUTF8 read fWK_JZ write fWK_JZ;
property WK_SZ: RawUTF8 read fWK_SZ write fWK_SZ;
property WK_GJ: RawUTF8 read fWK_GJ write fWK_GJ;
property WK_YSYJ: RawUTF8 read fWK_YSYJ write fWK_YSYJ;
property WK_QT: RawUTF8 read fWK_QT write fWK_QT;
property EB_ZETL: currency read fEB_ZETL write fEB_ZETL;
property EB_YETL: currency read fEB_YETL write fEB_YETL;
property EB_XJ: RawUTF8 read fEB_XJ write fEB_XJ;
property EB_YSYJ: RawUTF8 read fEB_YSYJ write fEB_YSYJ;
property EB_EBYH: RawUTF8 read fEB_EBYH write fEB_EBYH;
property KQ_CE: RawUTF8 read fKQ_CE write fKQ_CE;
property KQ_SFKC: RawUTF8 read fKQ_SFKC write fKQ_SFKC;
property KQ_YC: RawUTF8 read fKQ_YC write fKQ_YC;
property KQ_YSYJ: RawUTF8 read fKQ_YSYJ write fKQ_YSYJ;
property KQ_QT: RawUTF8 read fKQ_QT write fKQ_QT;
property XT: RawUTF8 read fXT write fXT;
property XT_YSYJ: RawUTF8 read fXT_YSYJ write fXT_YSYJ;
property XT_QT: RawUTF8 read fXT_QT write fXT_QT;
property GG_ZAM: RawUTF8 read fGG_ZAM write fGG_ZAM;
property GG_YGKY: RawUTF8 read fGG_YGKY write fGG_YGKY;
property GG_YSYJ: RawUTF8 read fGG_YSYJ write fGG_YSYJ;
property GG_QT: RawUTF8 read fGG_QT write fGG_QT;
property ZYSXDM1: RawUTF8 read fZYSXDM1 write fZYSXDM1;
property ZYSXDM2: RawUTF8 read fZYSXDM2 write fZYSXDM2;
property ZYSXDM3: RawUTF8 read fZYSXDM3 write fZYSXDM3;
property ZYSXDM4: RawUTF8 read fZYSXDM4 write fZYSXDM4;
property ZYSXDM5: RawUTF8 read fZYSXDM5 write fZYSXDM5;
property ZYSXDM6: RawUTF8 read fZYSXDM6 write fZYSXDM6;
property TJJLDM: RawUTF8 read fTJJLDM write fTJJLDM;
property BZ: RawUTF8 read fBZ write fBZ;
end;
when i create TSQLModel as follow, it failed with message "Access violation ad address 007CC7F4 in module 'project.exe', Read of address 00000004".
myModel := TSQLModel.Create([Ttjxx],'');
but many simple TSQLRecord s work fine.
thanks.
Merry Christmas to all!
awesome.
it works after i modify the code of THttpApiServer.Execute in SynCrtSock.pas:
from:
Err := Http.ReceiveRequestEntityBody(fReqQueue,Req^.RequestId,flags,
BufRead,InContentLength-InContentLengthRead,BytesRead);
to:
Err := Http.ReceiveRequestEntityBody(fReqQueue,Req^.RequestId,flags,
BufRead,2048,BytesRead);
and i can upload file more than 1024M now.
i found that Http.ReceiveRequestEntityBody got 1450 result.
ab,
i post a 350M file separately to two servers, server with windows 10 works fine, but client got Http Error 406 message from server with windows server 2003.
is it about default file size limitation?
thanks.
function TMyW3Server.process(Ctxt: THttpServerRequest): cardinal;
var
dwsfat:TFileAccessType;
pathFileName : String;
params : String;
infoCache : TFileAccessInfoCache;
request : THttpSysWebRequest;
response : THttpSysWebResponse;
fileAttribs : Cardinal;
...
begin
...
if Pos('\.', pathFileName)>0 then
// Directories or files beginning with a '.' are invisible
fileAttribs:=INVALID_FILE_ATTRIBUTES
else if not StrBeginsWith(pathFileName, FPath) then
begin
// request is outside base path
Ctxt.OutContent:='<h1>Not authorized</h1>';
Ctxt.OutContentType:=cHTMTL_UTF8_CONTENT_TYPE;
Result:=401;
Exit;
end
else
begin
{$WARN SYMBOL_PLATFORM OFF}
fileAttribs:=GetFileAttributes(Pointer(pathFileName));
if fileAttribs<>INVALID_FILE_ATTRIBUTES then begin
if (fileAttribs and faHidden)<>0 then
fileAttribs:=INVALID_FILE_ATTRIBUTES;
end;
{$WARN SYMBOL_PLATFORM ON}
end;
if fileAttribs=INVALID_FILE_ATTRIBUTES then
begin
Ctxt.OutContent:='<h1>Not found</h1>';
Ctxt.OutContentType:=cHTMTL_UTF8_CONTENT_TYPE;
Result:=404;
Exit;
end else if StrEndsWith(pathFileName, '.dws') then
begin
request := THttpSysWebRequest.Create;
response := THttpSysWebResponse.Create;
try
request.ResetCookies;
request.ResetQueryFields;
request.ResetContentFields;
request.ResetFields;
request.PathInfo := rtntext;
request.InURL := Ctxt.URL;
request.InHeaders := Ctxt.InHeaders;
request.InMethord := Ctxt.Method;
request.QueryString := query;
request.InContent := Ctxt.InContent;
request.InContentType := Ctxt.InContentType;
request.InRemoteIP := remoteip;
request.InUserAgent := agent;
request.InSecurity := 'No Security';
// case Ctxt.AuthenticationStatus of
// hrsSSL : request.Security:=Format('SSL, %d bits', [Ctxt.SecurityBytes*8]);
// else
// request.Security:='';
// end;
response.StatusCode:=200;
response.ContentType:=cHTMTL_UTF8_CONTENT_TYPE;
infoCache:=TFileAccessInfoCache(request.Custom);
if infoCache=nil then begin
infoCache:=TFileAccessInfoCache.Create(FileAccessInfoCacheSize);
request.Custom:=infoCache;
infoCache.CacheCounter:=FCacheCounter;
end else if infoCache.CacheCounter<>FCacheCounter then begin
infoCache.Flush;
infoCache.CacheCounter:=FCacheCounter;
end;
FDWS.HandleDWS(pathFileName,dwsfat, request, response,[]);
Ctxt.OutContent:=response.ContentData;
Ctxt.OutContentType:=response.ContentType;
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10 + nocacheheaderstr;
if response.HasHeaders then
Ctxt.OutCustomHeaders:=Ctxt.OutCustomHeaders + #13#10+
response.CompiledHeaders;
Result:=response.StatusCode;
finally
request.Free;
request := nil;
response.Free;
response := nil;
end;
end;
...
end;
i got it, and i will use "Set-Cookie: myCookie=1111111,22222222" instead.
BTW, i have accomplished dws within mORMot, see http://synopse.info/forum/viewtopic.php?id=947.
thanks ab and Eric, you are really so great!
just get one cookie at the same time, the first one or the second one, using each of the following code:
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10+ 'Set-Cookie: a=1111111111; b=22222222';
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10+ 'Set-Cookie: a=1111111111, b=22222222';
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10+ 'Set-Cookie: a=1111111111; b=22222222;';
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10+ 'Set-Cookie: a=1111111111;, b=22222222;';
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10+ 'Set-Cookie: a=1111111111; b=22222222';
with this code, just get the first one, 'b=22222222' is still missing.
hi,ab
i need to set more than one cookie key/value, but just the last one will be sent to the client. the code is as follow:
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10+
'Set-Cookie: a=1111111111' + #13#10 + 'Set-Cookie: b=22222222';
in the client response header, just get 'Set-Cookie: b=22222222'' string, and 'Set-Cookie: a=1111111111' is missing.
thanks!