Trying download file from idHTTPServer. From browser i do smth like localhost:7777/files/2019/1/7/1.php and downloading the file at last.
But when i close server in debug mode i have following error
EidClosedSocket with message "Disconnected"
How can i fix this ?
procedure TRPFiles.Download;
var
filepath: string;
begin
filepath := ExtractFileDir(Application.ExeName) + StringReplace(RequestInfo.URI, '/', '\', [rfReplaceAll]);
if TFile.Exists(filepath) then
begin
ResponseInfo.SmartServeFile(Context, RequestInfo, filepath);
FResponses.OK();
end;
end;