UrlDownloadToVar [AHK 1.1]

Post your working scripts, libraries and tools for AHK v1.1 and older
iseahound
Posts: 1456
Joined: 13 Aug 2016, 21:04
Contact:

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 10:51

Windows 8.1, Windows Server 2012 R2, Windows 10, Windows Server 2016, and later versions of Windows natively support TLS 1.2 for client-server communications over WinHTTP.
Earlier versions of Windows, such as Windows 7 or Windows Server 2012, don't enable TLS 1.1 or TLS 1.2 by default for secure communications using WinHTTP. For these earlier versions of Windows, install Update 3140245 to enable the registry value below, which can be set to add TLS 1.1 and TLS 1.2 to the default secure protocols list for WinHTTP. With the patch installed, create the following registry values:

To disable caching use MSXML2.ServerXMLHTTP
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 10:53

@malcev, thanks for the links!
The problem is that we can't control what OS our users have (in sense we can't make them to upgrade or update/patch their Windows), but to some degree we can control and use workarounds for some drawbacks of Msxml2.XMLHTTP.
I mean maybe we shouldn't replace WinHttp.WinHttpRequest.5.1 with Msxml2.XMLHTTP, but we should add the latter (or maybe mentioned MSXML2.ServerXMLHTTP) too to use in those cases when we distribute the script and we can overcome its drawbacks.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 17:00

iseahound wrote:To disable caching use MSXML2.ServerXMLHTTP
If You use proxy it does not help You.
amateur+, It depends on Your needs.
For example if You need to change tls version of connection in winhttprequest object, You can set option property, but to do the same with MSXML2 You need to change tls in registry or try to change ie advanced settings.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 17:56

How can we set that property for TLS 1.1 or 1.2?
Spoiler
Spoiler
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 17:59

Code: Select all

HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
HTTP.Option(9) := 0x80   ; TLS 1.0
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 18:12

Does enumeration starts with 0?
And if we need TLS 1.2, is it sufficient?
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 18:20

Does enumeration starts with 0?
Yes.
And if we need TLS 1.2, is it sufficient?
No. I already wrote how to add support for tls 1.2 on win7.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: UrlDownloadToVar [AHK 1.1]

30 Jan 2022, 18:28

Ok, thanks a lot!
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 140 guests