I'm trying to use TIdHTTP.Head('https://www.myurl.com/myfile.zip')
, just to get the file size before downloading it.
I get the file size so I can open multiple threads downloading parts of the file in parallel, so the download will be faster.
It was working OK until recently, when the Head()
method started to raise this exception:
Project myproject.exe raised exception class EIdHTTPProtocolException with message 'HTTP/1.1 406 Not Acceptable'.
My TIdHTTP
is connected to a TIdSSLIOHandlerSocketOpenSSL
, with these SSLOptions
:
Method = sslvSSLv23
SSLVersions = [sslvSSLv2,sslvSSLv3,sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2]
What should I look for?