diff --git a/src/mormot.commit.inc b/src/mormot.commit.inc index b3f534650..9768ba9ae 100644 --- a/src/mormot.commit.inc +++ b/src/mormot.commit.inc @@ -1 +1 @@ -'2.1.6338' +'2.1.6339' diff --git a/src/net/mormot.net.client.pas b/src/net/mormot.net.client.pas index a757f9e78..1bcc614cd 100644 --- a/src/net/mormot.net.client.pas +++ b/src/net/mormot.net.client.pas @@ -935,6 +935,13 @@ TWinHttpWebSocketClient = class destructor Destroy; override; end; +var + /// global flag to enable HTTP proxy detection at OS level for TWinHttp + // - as if Windows 8.1 and newer is detected + // - may be useful if {$R Vista.res} manifest is not available in the project, + // so only Windows 7 is detected by the executable + WinHttpForceProxyDetection: boolean; + {$endif USEWININET} {$ifdef USELIBCURL} @@ -2492,7 +2499,8 @@ procedure TWinHttp.InternalConnect(ConnectionTimeOut, SendTimeout, ReceiveTimeou begin WinHttpApiInitialize; if fProxyName = '' then - if OSVersion >= wEightOne then + if (OSVersion >= wEightOne) or + WinHttpForceProxyDetection then access := WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY // Windows 8.1 and newer else access := WINHTTP_ACCESS_TYPE_NO_PROXY