Skip to content

cohttp-eio: update tests for new Eio 1.4 getaddrinfo exception - #1142

Merged
avsm merged 1 commit into
mirage:mainfrom
talex5:eio-1.4
Jul 24, 2026
Merged

avsm merged 1 commit into
mirage:mainfrom
talex5:eio-1.4

Conversation

@talex5

@talex5 talex5 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Trying to connect to "http://foo.invalid" now raises Eio.Io Net Address_lookup_failed, not Failure.

Before (getaddrinfo returns [] and cohttp-eio raises an exception):

test_forward_proxy.exe: [INFO] GET http://foo.invalid
[failure] failed to resolve hostname

With Eio 1.4 getaddrinfo raises:

test_forward_proxy.exe: [INFO] GET http://foo.invalid
[exception] Eio.Io Net Address_lookup_failed NONAME (name or service is not known),
  looking up "foo.invalid" (service "http")

Trying to connect to "http://foo.invalid" now raises
`Eio.Io Net Address_lookup_failed`, not `Failure`.
@avsm

avsm commented Jul 24, 2026

Copy link
Copy Markdown
Member

lgtm, and backwards compatible with older eio

@avsm
avsm merged commit a297e5a into mirage:main Jul 24, 2026
8 checks passed
avsm added a commit to ocaml/opam-repository that referenced this pull request Jul 28, 2026
CHANGES:

- cohttp: remove duplicate occurance of lwt in dune-project (@Alizter, mirage/ocaml-cohttp#1138)
- cohttp-lwt: factor cohttp-lwt-unix binaries into their own project (@dijkstracula, mirage/ocaml-cohttp#1139)
- cohttp-eio: update for new Eio 1.4 getaddrinfo exception (@talex5, mirage/ocaml-cohttp#1142)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants