Open thielema opened 7 years ago
I would love if you can send a PR for both of these issues. :) It may take a while for me to work on this.
I am having this same problem. From GHCI:
openURIString "http://google.com"
Right "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en\"> [... elided]
λ> openURIString "http://reddit.com/r/nfl"
Left "Failed to connect: Undefined error: 0"
λ> openURIString "http://google.com"
Left "Failed to connect: Undefined error: 0"
Sorry, also no example here. :-( I wrote a web server and a web client. The server was written with
happstack
and client fetched web pages from the server viadownload
. My observations: If I quit the server then the client could no longer connect. But if I restart the server the client still refuses to connect. I suspect thatdownload
keeps some global state that turns a temporarily broken connection into a permanently broken connection. After replacingdownload
byHTTP:simpleHTTP
the problem was gone.