#1 2015-07-21 08:08:40

dexter
Member
Registered: 2015-04-24
Posts: 53

mORMotHttpClient.TSQLHttpClientRequest.InternalCheckOpen

Hi,

below is a fragment from TSQLHttpClientRequest.InternalCheckOpen method:

function TSQLHttpClientRequest.InternalCheckOpen: boolean;
begin
[...]
      fRequest := fRequestClass.Create(fServer,fPort,fHttps,
        fProxyName,fProxyByPass,fSendTimeout,fReceiveTimeout); // there are 7 parameters
[...]


THttpRequest constructor is declared as follows (with 8 parameters):

    constructor Create(const aServer, aPort: SockString; aHttps: boolean;
      const aProxyName: SockString=''; const aProxyByPass: SockString='';
      ConnectionTimeOut: DWORD=HTTP_DEFAULT_CONNECTTIMEOUT;
      SendTimeout: DWORD=HTTP_DEFAULT_SENDTIMEOUT;
      ReceiveTimeout: DWORD=HTTP_DEFAULT_RECEIVETIMEOUT); virtual;


Because of missing the ConnectionTimeout paramter, fSendTimeout is assigned to ConnectionTimeout, fReceiveTimeout is assigned to SendTimeout and ReceiveTimeout is left with default value HTTP_DEFAULT_RECEIVETIMEOUT.

This leads to issue when I need to set ReceiveTimeout with following command:

  Client := TSQLHttpClient.Create(Config.Param['Host'], Config.Param['Port'], Model, false, '', '', 60000, 90000);

The last value for ReceiveTimout (90000) will not be used later and will remain as remain default HTTP_DEFAULT_RECEIVETIMEOUT (30000).

Offline

#2 2015-07-21 09:34:58

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

Re: mORMotHttpClient.TSQLHttpClientRequest.InternalCheckOpen

I do not understand.

On our side, TSQLHttpClientRequest.InternalCheckOpen uses the 8 parameters:

      fRequest := fRequestClass.Create(fServer,fPort,fHttps,
        fProxyName,fProxyByPass,fConnectTimeout,fSendTimeout,fReceiveTimeout);

Offline

#3 2015-07-21 10:34:23

dexter
Member
Registered: 2015-04-24
Posts: 53

Re: mORMotHttpClient.TSQLHttpClientRequest.InternalCheckOpen

Looks like it was fixed in some later builds.
I have the build from 24.04.2015

Offline

Board footer

Powered by FluxBB