This is an automated email from the ASF dual-hosted git repository. jensg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git
commit 14a9a120a859c2e101bcd5f529693139bf9aef7a Author: Jens Geyer <[email protected]> AuthorDate: Thu May 9 23:29:24 2019 +0200 THRIFT-4863 better indication of WinHTTP errors Client: Delphi Patch: Jens Geyer --- lib/delphi/src/Thrift.WinHTTP.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/delphi/src/Thrift.WinHTTP.pas b/lib/delphi/src/Thrift.WinHTTP.pas index 0d824b6..6ad8400 100644 --- a/lib/delphi/src/Thrift.WinHTTP.pas +++ b/lib/delphi/src/Thrift.WinHTTP.pas @@ -497,6 +497,7 @@ begin PWideChar(Pointer(aProxy)), // may be nil PWideChar(Pointer(aProxyBypass)), // may be nil aFlags); + if handle = nil then RaiseLastOSError; inherited Create( handle); end; @@ -527,6 +528,7 @@ var handle : HINTERNET; begin FSession := aSession; handle := WinHttpConnect( FSession.Handle, PWideChar(aHostName), aPort, 0); + if handle = nil then RaiseLastOSError; inherited Create( handle); end; @@ -572,6 +574,7 @@ begin PWideChar(aReferrer), @accept, aFlags); + if handle = nil then RaiseLastOSError; inherited Create( handle); end;
