std.net.curl.CurlException Couldn't resolve host name on handle

Vino akashvino79 at gmail.com
Sat Mar 14 04:24:20 UTC 2020


On Friday, 13 March 2020 at 18:10:51 UTC, Vino wrote:
> Hi All,
>
>   Request your help, the below code is fetching the required 
> data, after fetching the data at the end it throws the below 
> errors , hence request your help on how to handle this issue.
>
> Code:
>
> import std.net.curl, std.stdio, std.conv: to;
>
> void main () {
> auto http = HTTP();
> http.handle.set(CurlOption.userpwd, "test:password");
> http.handle.set(CurlOption.connecttimeout, 300);
> http.handle.set(CurlOption.timeout, 600);
> http.handle.set(CurlOption.tcp_nodelay, 1);
> http.handle.set(CurlOption.buffersize,1073741824);
> http.handle.set(CurlOption.url, "https://test:8130/sdata");
> http.method(HTTP.Method.get);
> auto content = http.perform();
> http.shutdown;
> foreach (line; byLine(to!string(content)))
> writeln(line);
> }
>
> Error
> std.net.curl.CurlException at std\net\curl.d(4364): Couldn't 
> resolve host name on handle BC9A90
> ----------------
> 0x004032AF
> 0x00403258
> 0x00408A34
> 0x00408890
> 0x00403F89
> 0x00403046
> 0x004023E8
> 0x0041A073
> 0x00419FED
> 0x00419E88
> 0x00413EBA
> 0x0040B18B
> 0x74EE6359 in BaseThreadInitThunk
> 0x77227B74 in RtlGetAppContainerNamedObjectPath
> 0x77227B44 in RtlGetAppContainerNamedObjectPath
>
> From,
> Vino.B

Hi All,

   I was able to resolve this issue by upgrading DMD from V88 to 
V91.0, and now I am getting the below error when i set any of the 
below options

http.handle.set(CurlOption.ipresolve, "v4");
http.handle.set(CurlOption.http_version, "v1_1");
http.handle.set(CurlOption.sslversion,  "sslv3");

Error:
std.net.curl.CurlException at std\net\curl.d(4388): A libcurl 
function was given a bad argument on handle CF2990
----------------
0x0040B425
0x00402397
0x00406E17
0x00406D91
0x00406C2A
0x0040404A
0x0040242F
0x75BC6359 in BaseThreadInitThunk
0x77BB7B74 in RtlGetAppContainerNamedObjectPath
0x77BB7B44 in RtlGetAppContainerNamedObjectPath

from,
Vino.B




More information about the Digitalmars-d-learn mailing list