Indy Http 10连接正常关闭

时间:2017-04-03 10:17:33

标签: delphi idhttp

我正在使用Indy的TIdHTTP组件的应用程序。

我向HTTP服务器发送请求,然后发回报告。但是,当报告太长时,我会收到此错误:

  

连接正常关闭

以下是我的代码的一部分:

procedure TdmAthlos.HttpClientAuthorization(Sender: TObject;  Authentication: TIdAuthentication; var Handled: Boolean);
begin
  HttpClient.Socket.Host                       := fOptiuni.edIP.Text;
  HttpClient.Request.BasicAuthentication       := True;
  HttpClient.Request.Authentication.Username   := fOptiuni.edUsername.Text;
  HttpClient.Request.Authentication.Password   := fOptiuni.edPassword.Text;
end;

procedure TdmAthlos.HttpClientConnected(Sender: TObject);
begin
  HttpClient.Socket.Binding.SetKeepAliveValues(True, 1500, 1000);
end;

0 个答案:

没有答案