You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While switching my code from IPv4 only to mixed mode as well as IPv6 only mode, I encountered a strange bug in attohttpc.
At first, I thought it would be as easy as replacing strings such as "http://127.0.0.1:3000/fancy_rest" with "http://[::1]:3000/fancy_rest". The latter works in my browser and in curl. Even the url crate can parse it correctly.
Just when I use attohttpc I get the following error on Linux:
Error(Io(Custom { kind: Other, error: "failed to lookup address information: Name or service not known" }))
on other systems it might also be displayed like the following:
Error(Io(Custom { kind: Other, error: "failed to lookup address information: Temporary failure in name resolution" }))
Probably trying to interpret [::1] as a hostname instead of an IpAddr.
Unfortunately, attohttpc is not yet available on the rust playground, otherwise, I would have shown a minimal example there.
And totally unrelated: thank you for providing a pretty neat, slim and efficient http client library without async+await :D
The text was updated successfully, but these errors were encountered:
I think the problem is that Ipv6Addr::from_strdoes not parse the [...] notation, but we use Url::host_str which hands out this notation instead of using Url::host which gives either an already parsed address or a domain name. Will prepare an MR to switch us to Url::host...
While switching my code from IPv4 only to mixed mode as well as IPv6 only mode, I encountered a strange bug in attohttpc.
At first, I thought it would be as easy as replacing strings such as "http://127.0.0.1:3000/fancy_rest" with "http://[::1]:3000/fancy_rest". The latter works in my browser and in
curl
. Even theurl
crate can parse it correctly.Just when I use
attohttpc
I get the following error on Linux:on other systems it might also be displayed like the following:
Probably trying to interpret [::1] as a hostname instead of an
IpAddr
.Unfortunately,
attohttpc
is not yet available on the rust playground, otherwise, I would have shown a minimal example there.And totally unrelated: thank you for providing a pretty neat, slim and efficient http client library without async+await :D
The text was updated successfully, but these errors were encountered: