#1 2018-02-21 07:59:28

mingda
Member
Registered: 2013-01-04
Posts: 121

TSQLRestServerURIContext.ReturnFile produce AV

Hi,
  I have a running program, today i update mORMot to last 4322 trunk, from browser get a file will get a EAccessViolation,
i debug found when call function ExistsIniName(P: PUTF8Char; UpperName: PAnsiChar): boolean; parameter P is nil,

procedure TSQLRestServerURIContext.ReturnFile(const FileName: TFileName;
  Handle304NotModified: boolean; const ContentType,AttachmentFileName,
  Error404Redirect: RawUTF8);
var FileTime: TDateTime;
    clientHash, serverHash: RawUTF8;
begin
...
    if not ExistsIniName(pointer(Call.OutHead),HEADER_CONTENT_TYPE_UPPER) then begin   ==>run into ExistsIniName produce av
...
end;

DelphiXE with 4322 mORMot

thanks!

Offline

#2 2018-02-21 11:25:41

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: TSQLRestServerURIContext.ReturnFile produce AV

Oups!

Please try https://synopse.info/fossil/info/4e5384f8f7

Sorry for the problem...

Offline

#3 2018-02-21 12:43:52

mingda
Member
Registered: 2013-01-04
Posts: 121

Re: TSQLRestServerURIContext.ReturnFile produce AV

As always, works like a charm, thank you very much!

Offline

Board footer

Powered by FluxBB