Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

HttpSendFile

function HttpSendFile(const aRequest: iHttpRequest; const aResponse: iHttpResponse; const aPhysicalFile: string; const aCacheControl: string = ''): Integer;
SendFileRange with the validators and preconditions above: opens the file, reads its validators off the handle, sets Content-Type from the extension and calls HttpSendStream. 404 for a file that is not there or will not open, as SendFile. aPhysicalFile is opened BY NAME and used as given - the same warning as SendFile: derive it from a registered mapping or a jail, never from the request; and if you HOLD a verified handle, hand its stream to HttpSendStream instead of coming through here.